diff --git a/packages/api/src/client/index.ts b/packages/api/src/client/index.ts index 3850e0abef7..2026bd40644 100644 --- a/packages/api/src/client/index.ts +++ b/packages/api/src/client/index.ts @@ -4,6 +4,7 @@ import { XrpcClient, FetchHandler, FetchHandlerOptions } from '@atproto/xrpc' import { schemas } from './lexicons' import { CID } from 'multiformats/cid' +import { OmitKey } from './util' import * as ComAtprotoAdminDefs from './types/com/atproto/admin/defs' import * as ComAtprotoAdminDeleteAccount from './types/com/atproto/admin/deleteAccount' import * as ComAtprotoAdminDisableAccountInvites from './types/com/atproto/admin/disableAccountInvites' @@ -1588,7 +1589,7 @@ export class ProfileRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyActorProfile.Record }[] @@ -1601,7 +1602,7 @@ export class ProfileRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string; cid: string; value: AppBskyActorProfile.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'app.bsky.actor.profile', @@ -1611,25 +1612,30 @@ export class ProfileRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyActorProfile.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.actor.profile' + const collection = 'app.bsky.actor.profile' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.actor.profile', rkey: 'self', ...params, record }, + { + collection, + rkey: 'self', + ...params, + record: { ...record, $type: collection }, + }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -1871,7 +1877,7 @@ export class GeneratorRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyFeedGenerator.Record }[] @@ -1884,7 +1890,7 @@ export class GeneratorRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string; cid: string; value: AppBskyFeedGenerator.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'app.bsky.feed.generator', @@ -1894,25 +1900,25 @@ export class GeneratorRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyFeedGenerator.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.feed.generator' + const collection = 'app.bsky.feed.generator' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.feed.generator', ...params, record }, + { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -1932,7 +1938,7 @@ export class LikeRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyFeedLike.Record }[] @@ -1945,7 +1951,7 @@ export class LikeRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string; cid: string; value: AppBskyFeedLike.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'app.bsky.feed.like', @@ -1955,25 +1961,25 @@ export class LikeRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyFeedLike.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.feed.like' + const collection = 'app.bsky.feed.like' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.feed.like', ...params, record }, + { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -1993,7 +1999,7 @@ export class PostRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyFeedPost.Record }[] @@ -2006,7 +2012,7 @@ export class PostRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string; cid: string; value: AppBskyFeedPost.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'app.bsky.feed.post', @@ -2016,25 +2022,25 @@ export class PostRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyFeedPost.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.feed.post' + const collection = 'app.bsky.feed.post' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.feed.post', ...params, record }, + { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -2054,7 +2060,7 @@ export class PostgateRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyFeedPostgate.Record }[] @@ -2067,7 +2073,7 @@ export class PostgateRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string; cid: string; value: AppBskyFeedPostgate.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'app.bsky.feed.postgate', @@ -2077,25 +2083,25 @@ export class PostgateRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyFeedPostgate.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.feed.postgate' + const collection = 'app.bsky.feed.postgate' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.feed.postgate', ...params, record }, + { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -2115,7 +2121,7 @@ export class RepostRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyFeedRepost.Record }[] @@ -2128,7 +2134,7 @@ export class RepostRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string; cid: string; value: AppBskyFeedRepost.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'app.bsky.feed.repost', @@ -2138,25 +2144,25 @@ export class RepostRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyFeedRepost.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.feed.repost' + const collection = 'app.bsky.feed.repost' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.feed.repost', ...params, record }, + { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -2176,7 +2182,7 @@ export class ThreadgateRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyFeedThreadgate.Record }[] @@ -2189,7 +2195,7 @@ export class ThreadgateRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string cid: string @@ -2203,25 +2209,25 @@ export class ThreadgateRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyFeedThreadgate.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.feed.threadgate' + const collection = 'app.bsky.feed.threadgate' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.feed.threadgate', ...params, record }, + { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -2470,7 +2476,7 @@ export class BlockRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyGraphBlock.Record }[] @@ -2483,7 +2489,7 @@ export class BlockRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string; cid: string; value: AppBskyGraphBlock.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'app.bsky.graph.block', @@ -2493,25 +2499,25 @@ export class BlockRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyGraphBlock.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.graph.block' + const collection = 'app.bsky.graph.block' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.graph.block', ...params, record }, + { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -2531,7 +2537,7 @@ export class FollowRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyGraphFollow.Record }[] @@ -2544,7 +2550,7 @@ export class FollowRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string; cid: string; value: AppBskyGraphFollow.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'app.bsky.graph.follow', @@ -2554,25 +2560,25 @@ export class FollowRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyGraphFollow.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.graph.follow' + const collection = 'app.bsky.graph.follow' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.graph.follow', ...params, record }, + { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -2592,7 +2598,7 @@ export class ListRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyGraphList.Record }[] @@ -2605,7 +2611,7 @@ export class ListRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string; cid: string; value: AppBskyGraphList.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'app.bsky.graph.list', @@ -2615,25 +2621,25 @@ export class ListRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyGraphList.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.graph.list' + const collection = 'app.bsky.graph.list' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.graph.list', ...params, record }, + { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -2653,7 +2659,7 @@ export class ListblockRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyGraphListblock.Record }[] @@ -2666,7 +2672,7 @@ export class ListblockRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string cid: string @@ -2680,25 +2686,25 @@ export class ListblockRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyGraphListblock.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.graph.listblock' + const collection = 'app.bsky.graph.listblock' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.graph.listblock', ...params, record }, + { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -2718,7 +2724,7 @@ export class ListitemRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyGraphListitem.Record }[] @@ -2731,7 +2737,7 @@ export class ListitemRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string; cid: string; value: AppBskyGraphListitem.Record }> { const res = await this._client.call('com.atproto.repo.getRecord', { collection: 'app.bsky.graph.listitem', @@ -2741,25 +2747,25 @@ export class ListitemRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyGraphListitem.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.graph.listitem' + const collection = 'app.bsky.graph.listitem' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.graph.listitem', ...params, record }, + { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -2779,7 +2785,7 @@ export class StarterpackRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyGraphStarterpack.Record }[] @@ -2792,7 +2798,7 @@ export class StarterpackRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string cid: string @@ -2806,25 +2812,25 @@ export class StarterpackRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyGraphStarterpack.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.graph.starterpack' + const collection = 'app.bsky.graph.starterpack' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, - { collection: 'app.bsky.graph.starterpack', ...params, record }, + { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers }, ) return res.data } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -2866,7 +2872,7 @@ export class ServiceRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: AppBskyLabelerService.Record }[] @@ -2879,7 +2885,7 @@ export class ServiceRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string cid: string @@ -2893,22 +2899,22 @@ export class ServiceRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: AppBskyLabelerService.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'app.bsky.labeler.service' + const collection = 'app.bsky.labeler.service' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, { - collection: 'app.bsky.labeler.service', + collection, rkey: 'self', ...params, - record, + record: { ...record, $type: collection }, }, { encoding: 'application/json', headers }, ) @@ -2916,7 +2922,7 @@ export class ServiceRecord { } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( @@ -3187,7 +3193,7 @@ export class DeclarationRecord { } async list( - params: Omit, + params: OmitKey, ): Promise<{ cursor?: string records: { uri: string; value: ChatBskyActorDeclaration.Record }[] @@ -3200,7 +3206,7 @@ export class DeclarationRecord { } async get( - params: Omit, + params: OmitKey, ): Promise<{ uri: string cid: string @@ -3214,22 +3220,22 @@ export class DeclarationRecord { } async create( - params: Omit< + params: OmitKey< ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record' >, record: ChatBskyActorDeclaration.Record, headers?: Record, ): Promise<{ uri: string; cid: string }> { - record.$type = 'chat.bsky.actor.declaration' + const collection = 'chat.bsky.actor.declaration' const res = await this._client.call( 'com.atproto.repo.createRecord', undefined, { - collection: 'chat.bsky.actor.declaration', + collection, rkey: 'self', ...params, - record, + record: { ...record, $type: collection }, }, { encoding: 'application/json', headers }, ) @@ -3237,7 +3243,7 @@ export class DeclarationRecord { } async delete( - params: Omit, + params: OmitKey, headers?: Record, ): Promise { await this._client.call( diff --git a/packages/api/src/client/lexicons.ts b/packages/api/src/client/lexicons.ts index 03821c358c0..f0d88577b9a 100644 --- a/packages/api/src/client/lexicons.ts +++ b/packages/api/src/client/lexicons.ts @@ -13576,4 +13576,4 @@ export const ids = { ToolsOzoneTeamDeleteMember: 'tools.ozone.team.deleteMember', ToolsOzoneTeamListMembers: 'tools.ozone.team.listMembers', ToolsOzoneTeamUpdateMember: 'tools.ozone.team.updateMember', -} +} as const diff --git a/packages/api/src/client/types/app/bsky/actor/defs.ts b/packages/api/src/client/types/app/bsky/actor/defs.ts index 322a79b3b20..b355fbe40e2 100644 --- a/packages/api/src/client/types/app/bsky/actor/defs.ts +++ b/packages/api/src/client/types/app/bsky/actor/defs.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' import * as AppBskyGraphDefs from '../graph/defs' @@ -12,6 +12,7 @@ import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.actor.defs' export interface ProfileViewBasic { + $type?: 'app.bsky.actor.defs#profileViewBasic' did: string handle: string displayName?: string @@ -20,7 +21,6 @@ export interface ProfileViewBasic { viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] createdAt?: string - [k: string]: unknown } export function isProfileViewBasic(v: unknown): v is ProfileViewBasic & { @@ -37,6 +37,7 @@ export function validateProfileViewBasic(v: unknown) { } export interface ProfileView { + $type?: 'app.bsky.actor.defs#profileView' did: string handle: string displayName?: string @@ -47,7 +48,6 @@ export interface ProfileView { createdAt?: string viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isProfileView( @@ -64,6 +64,7 @@ export function validateProfileView(v: unknown) { } export interface ProfileViewDetailed { + $type?: 'app.bsky.actor.defs#profileViewDetailed' did: string handle: string displayName?: string @@ -80,7 +81,6 @@ export interface ProfileViewDetailed { viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] pinnedPost?: ComAtprotoRepoStrongRef.Main - [k: string]: unknown } export function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed & { @@ -97,12 +97,12 @@ export function validateProfileViewDetailed(v: unknown) { } export interface ProfileAssociated { + $type?: 'app.bsky.actor.defs#profileAssociated' lists?: number feedgens?: number starterPacks?: number labeler?: boolean chat?: ProfileAssociatedChat - [k: string]: unknown } export function isProfileAssociated(v: unknown): v is ProfileAssociated & { @@ -119,8 +119,8 @@ export function validateProfileAssociated(v: unknown) { } export interface ProfileAssociatedChat { + $type?: 'app.bsky.actor.defs#profileAssociatedChat' allowIncoming: 'all' | 'none' | 'following' | (string & {}) - [k: string]: unknown } export function isProfileAssociatedChat( @@ -140,6 +140,7 @@ export function validateProfileAssociatedChat(v: unknown) { /** 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 @@ -148,7 +149,6 @@ export interface ViewerState { following?: string followedBy?: string knownFollowers?: KnownFollowers - [k: string]: unknown } export function isViewerState( @@ -166,9 +166,9 @@ export function validateViewerState(v: unknown) { /** The subject's followers whom you also follow */ export interface KnownFollowers { + $type?: 'app.bsky.actor.defs#knownFollowers' count: number followers: ProfileViewBasic[] - [k: string]: unknown } export function isKnownFollowers(v: unknown): v is KnownFollowers & { @@ -201,8 +201,8 @@ export type Preferences = ( )[] export interface AdultContentPref { + $type?: 'app.bsky.actor.defs#adultContentPref' enabled: boolean - [k: string]: unknown } export function isAdultContentPref(v: unknown): v is AdultContentPref & { @@ -219,11 +219,11 @@ export function validateAdultContentPref(v: unknown) { } 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 & {}) - [k: string]: unknown } export function isContentLabelPref(v: unknown): v is ContentLabelPref & { @@ -240,11 +240,11 @@ export function validateContentLabelPref(v: unknown) { } export interface SavedFeed { + $type?: 'app.bsky.actor.defs#savedFeed' id: string type: 'feed' | 'list' | 'timeline' | (string & {}) value: string pinned: boolean - [k: string]: unknown } export function isSavedFeed( @@ -258,8 +258,8 @@ export function validateSavedFeed(v: unknown) { } export interface SavedFeedsPrefV2 { + $type?: 'app.bsky.actor.defs#savedFeedsPrefV2' items: SavedFeed[] - [k: string]: unknown } export function isSavedFeedsPrefV2(v: unknown): v is SavedFeedsPrefV2 & { @@ -276,10 +276,10 @@ export function validateSavedFeedsPrefV2(v: unknown) { } export interface SavedFeedsPref { + $type?: 'app.bsky.actor.defs#savedFeedsPref' pinned: string[] saved: string[] timelineIndex?: number - [k: string]: unknown } export function isSavedFeedsPref(v: unknown): v is SavedFeedsPref & { @@ -296,9 +296,9 @@ export function validateSavedFeedsPref(v: unknown) { } export interface PersonalDetailsPref { + $type?: 'app.bsky.actor.defs#personalDetailsPref' /** The birth date of account owner. */ birthDate?: string - [k: string]: unknown } export function isPersonalDetailsPref(v: unknown): v is PersonalDetailsPref & { @@ -315,6 +315,7 @@ export function validatePersonalDetailsPref(v: unknown) { } 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. */ @@ -327,7 +328,6 @@ export interface FeedViewPref { hideReposts?: boolean /** Hide quote posts in the feed. */ hideQuotePosts?: boolean - [k: string]: unknown } export function isFeedViewPref( @@ -344,11 +344,11 @@ export function validateFeedViewPref(v: unknown) { } export interface ThreadViewPref { + $type?: 'app.bsky.actor.defs#threadViewPref' /** Sorting mode for threads. */ sort?: 'oldest' | 'newest' | 'most-likes' | 'random' | (string & {}) /** Show followed users at the top of all replies. */ prioritizeFollowedUsers?: boolean - [k: string]: unknown } export function isThreadViewPref(v: unknown): v is ThreadViewPref & { @@ -365,9 +365,9 @@ export function validateThreadViewPref(v: unknown) { } 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[] - [k: string]: unknown } export function isInterestsPref(v: unknown): v is InterestsPref & { @@ -387,6 +387,7 @@ export type MutedWordTarget = 'content' | 'tag' | (string & {}) /** 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 @@ -396,7 +397,6 @@ export interface MutedWord { actorTarget: 'all' | 'exclude-following' | (string & {}) /** The date and time at which the muted word will expire and no longer be applied. */ expiresAt?: string - [k: string]: unknown } export function isMutedWord( @@ -410,9 +410,9 @@ export function validateMutedWord(v: unknown) { } export interface MutedWordsPref { + $type?: 'app.bsky.actor.defs#mutedWordsPref' /** A list of words the account owner has muted. */ items: MutedWord[] - [k: string]: unknown } export function isMutedWordsPref(v: unknown): v is MutedWordsPref & { @@ -429,9 +429,9 @@ export function validateMutedWordsPref(v: unknown) { } export interface HiddenPostsPref { + $type?: 'app.bsky.actor.defs#hiddenPostsPref' /** A list of URIs of posts the account owner has hidden. */ items: string[] - [k: string]: unknown } export function isHiddenPostsPref(v: unknown): v is HiddenPostsPref & { @@ -448,8 +448,8 @@ export function validateHiddenPostsPref(v: unknown) { } export interface LabelersPref { + $type?: 'app.bsky.actor.defs#labelersPref' labelers: LabelerPrefItem[] - [k: string]: unknown } export function isLabelersPref( @@ -466,8 +466,8 @@ export function validateLabelersPref(v: unknown) { } export interface LabelerPrefItem { + $type?: 'app.bsky.actor.defs#labelerPrefItem' did: string - [k: string]: unknown } export function isLabelerPrefItem(v: unknown): v is LabelerPrefItem & { @@ -485,12 +485,12 @@ export function validateLabelerPrefItem(v: unknown) { /** 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[] - [k: string]: unknown } export function isBskyAppStatePref(v: unknown): v is BskyAppStatePref & { @@ -508,8 +508,8 @@ export function validateBskyAppStatePref(v: unknown) { /** 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 - [k: string]: unknown } export function isBskyAppProgressGuide( @@ -529,13 +529,13 @@ export function validateBskyAppProgressGuide(v: unknown) { /** 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 - [k: string]: unknown } export function isNux( diff --git a/packages/api/src/client/types/app/bsky/actor/getPreferences.ts b/packages/api/src/client/types/app/bsky/actor/getPreferences.ts index 0ec7b98b92c..0d0c014f41e 100644 --- a/packages/api/src/client/types/app/bsky/actor/getPreferences.ts +++ b/packages/api/src/client/types/app/bsky/actor/getPreferences.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from './defs' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { preferences: AppBskyActorDefs.Preferences - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/actor/getProfile.ts b/packages/api/src/client/types/app/bsky/actor/getProfile.ts index 906d7ed3196..2913b1d81fc 100644 --- a/packages/api/src/client/types/app/bsky/actor/getProfile.ts +++ b/packages/api/src/client/types/app/bsky/actor/getProfile.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from './defs' diff --git a/packages/api/src/client/types/app/bsky/actor/getProfiles.ts b/packages/api/src/client/types/app/bsky/actor/getProfiles.ts index 8d07d783aba..cd98f434ae7 100644 --- a/packages/api/src/client/types/app/bsky/actor/getProfiles.ts +++ b/packages/api/src/client/types/app/bsky/actor/getProfiles.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from './defs' @@ -18,7 +18,6 @@ export type InputSchema = undefined export interface OutputSchema { profiles: AppBskyActorDefs.ProfileViewDetailed[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts b/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts index 5df24f37d82..6304e6bba25 100644 --- a/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts +++ b/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string actors: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/actor/profile.ts b/packages/api/src/client/types/app/bsky/actor/profile.ts index b9f37890669..d3519106349 100644 --- a/packages/api/src/client/types/app/bsky/actor/profile.ts +++ b/packages/api/src/client/types/app/bsky/actor/profile.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' @@ -11,6 +11,7 @@ import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.actor.profile' export interface Record { + $type?: 'app.bsky.actor.profile' | 'app.bsky.actor.profile#main' displayName?: string /** Free-form profile description text. */ description?: string diff --git a/packages/api/src/client/types/app/bsky/actor/putPreferences.ts b/packages/api/src/client/types/app/bsky/actor/putPreferences.ts index 540a12674a5..7c12efbac8b 100644 --- a/packages/api/src/client/types/app/bsky/actor/putPreferences.ts +++ b/packages/api/src/client/types/app/bsky/actor/putPreferences.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from './defs' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { preferences: AppBskyActorDefs.Preferences - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/actor/searchActors.ts b/packages/api/src/client/types/app/bsky/actor/searchActors.ts index b96de15360e..fbc111691e1 100644 --- a/packages/api/src/client/types/app/bsky/actor/searchActors.ts +++ b/packages/api/src/client/types/app/bsky/actor/searchActors.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from './defs' @@ -24,7 +24,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string actors: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts b/packages/api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts index eb8f6402235..f348a95dd19 100644 --- a/packages/api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts +++ b/packages/api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { actors: AppBskyActorDefs.ProfileViewBasic[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/embed/defs.ts b/packages/api/src/client/types/app/bsky/embed/defs.ts index 937dbeaf71d..6c811b4d602 100644 --- a/packages/api/src/client/types/app/bsky/embed/defs.ts +++ b/packages/api/src/client/types/app/bsky/embed/defs.ts @@ -3,16 +3,16 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export 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 - [k: string]: unknown } export function isAspectRatio( diff --git a/packages/api/src/client/types/app/bsky/embed/external.ts b/packages/api/src/client/types/app/bsky/embed/external.ts index f523615380b..4be424f349a 100644 --- a/packages/api/src/client/types/app/bsky/embed/external.ts +++ b/packages/api/src/client/types/app/bsky/embed/external.ts @@ -3,15 +3,15 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export 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' | 'app.bsky.embed.external#main' external: External - [k: string]: unknown } export function isMain( @@ -25,11 +25,11 @@ export function validateMain(v: unknown) { } export interface External { + $type?: 'app.bsky.embed.external#external' uri: string title: string description: string thumb?: BlobRef - [k: string]: unknown } export function isExternal( @@ -43,8 +43,8 @@ export function validateExternal(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.external#view' external: ViewExternal - [k: string]: unknown } export function isView( @@ -58,11 +58,11 @@ export function validateView(v: unknown) { } export interface ViewExternal { + $type?: 'app.bsky.embed.external#viewExternal' uri: string title: string description: string thumb?: string - [k: string]: unknown } export function isViewExternal(v: unknown): v is ViewExternal & { diff --git a/packages/api/src/client/types/app/bsky/embed/images.ts b/packages/api/src/client/types/app/bsky/embed/images.ts index 5f9f9f39c22..0fe3d361548 100644 --- a/packages/api/src/client/types/app/bsky/embed/images.ts +++ b/packages/api/src/client/types/app/bsky/embed/images.ts @@ -3,15 +3,15 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyEmbedDefs from './defs' export const id = 'app.bsky.embed.images' export interface Main { + $type?: 'app.bsky.embed.images' | 'app.bsky.embed.images#main' images: Image[] - [k: string]: unknown } export function isMain( @@ -25,11 +25,11 @@ export function validateMain(v: unknown) { } export interface Image { + $type?: 'app.bsky.embed.images#image' image: BlobRef /** Alt text description of the image, for accessibility. */ alt: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isImage( @@ -43,8 +43,8 @@ export function validateImage(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.images#view' images: ViewImage[] - [k: string]: unknown } export function isView( @@ -58,6 +58,7 @@ export function validateView(v: unknown) { } 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. */ @@ -65,7 +66,6 @@ export interface ViewImage { /** Alt text description of the image, for accessibility. */ alt: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isViewImage( diff --git a/packages/api/src/client/types/app/bsky/embed/record.ts b/packages/api/src/client/types/app/bsky/embed/record.ts index 3289ca15f58..a773eaddda8 100644 --- a/packages/api/src/client/types/app/bsky/embed/record.ts +++ b/packages/api/src/client/types/app/bsky/embed/record.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' import * as AppBskyFeedDefs from '../feed/defs' @@ -19,8 +19,8 @@ import * as AppBskyEmbedRecordWithMedia from './recordWithMedia' export const id = 'app.bsky.embed.record' export interface Main { + $type?: 'app.bsky.embed.record' | 'app.bsky.embed.record#main' record: ComAtprotoRepoStrongRef.Main - [k: string]: unknown } export function isMain( @@ -34,6 +34,7 @@ export function validateMain(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.record#view' record: | ViewRecord | ViewNotFound @@ -44,7 +45,6 @@ export interface View { | AppBskyLabelerDefs.LabelerView | AppBskyGraphDefs.StarterPackViewBasic | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isView( @@ -58,11 +58,12 @@ export function validateView(v: unknown) { } export interface ViewRecord { + $type?: 'app.bsky.embed.record#viewRecord' uri: string cid: string author: AppBskyActorDefs.ProfileViewBasic /** The record data itself. */ - value: {} + value: { [_ in string]: unknown } labels?: ComAtprotoLabelDefs.Label[] replyCount?: number repostCount?: number @@ -77,7 +78,6 @@ export interface ViewRecord { | { $type: string; [k: string]: unknown } )[] indexedAt: string - [k: string]: unknown } export function isViewRecord( @@ -94,9 +94,9 @@ export function validateViewRecord(v: unknown) { } export interface ViewNotFound { + $type?: 'app.bsky.embed.record#viewNotFound' uri: string notFound: true - [k: string]: unknown } export function isViewNotFound(v: unknown): v is ViewNotFound & { @@ -113,10 +113,10 @@ export function validateViewNotFound(v: unknown) { } export interface ViewBlocked { + $type?: 'app.bsky.embed.record#viewBlocked' uri: string blocked: true author: AppBskyFeedDefs.BlockedAuthor - [k: string]: unknown } export function isViewBlocked( @@ -133,9 +133,9 @@ export function validateViewBlocked(v: unknown) { } export interface ViewDetached { + $type?: 'app.bsky.embed.record#viewDetached' uri: string detached: true - [k: string]: unknown } export function isViewDetached(v: unknown): v is ViewDetached & { diff --git a/packages/api/src/client/types/app/bsky/embed/recordWithMedia.ts b/packages/api/src/client/types/app/bsky/embed/recordWithMedia.ts index 46ff8bf6c16..00e9d308fcd 100644 --- a/packages/api/src/client/types/app/bsky/embed/recordWithMedia.ts +++ b/packages/api/src/client/types/app/bsky/embed/recordWithMedia.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyEmbedRecord from './record' import * as AppBskyEmbedImages from './images' @@ -13,13 +13,15 @@ import * as AppBskyEmbedExternal from './external' export const id = 'app.bsky.embed.recordWithMedia' export interface Main { + $type?: + | 'app.bsky.embed.recordWithMedia' + | 'app.bsky.embed.recordWithMedia#main' record: AppBskyEmbedRecord.Main media: | AppBskyEmbedImages.Main | AppBskyEmbedVideo.Main | AppBskyEmbedExternal.Main | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isMain( @@ -33,13 +35,13 @@ export function validateMain(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.recordWithMedia#view' record: AppBskyEmbedRecord.View media: | AppBskyEmbedImages.View | AppBskyEmbedVideo.View | AppBskyEmbedExternal.View | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isView( diff --git a/packages/api/src/client/types/app/bsky/embed/video.ts b/packages/api/src/client/types/app/bsky/embed/video.ts index a37f33c0232..f23166a8a09 100644 --- a/packages/api/src/client/types/app/bsky/embed/video.ts +++ b/packages/api/src/client/types/app/bsky/embed/video.ts @@ -3,19 +3,19 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyEmbedDefs from './defs' export const id = 'app.bsky.embed.video' export interface Main { + $type?: 'app.bsky.embed.video' | 'app.bsky.embed.video#main' video: BlobRef captions?: Caption[] /** Alt text description of the video, for accessibility. */ alt?: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isMain( @@ -29,9 +29,9 @@ export function validateMain(v: unknown) { } export interface Caption { + $type?: 'app.bsky.embed.video#caption' lang: string file: BlobRef - [k: string]: unknown } export function isCaption( @@ -45,12 +45,12 @@ export function validateCaption(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.video#view' cid: string playlist: string thumbnail?: string alt?: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isView( diff --git a/packages/api/src/client/types/app/bsky/feed/defs.ts b/packages/api/src/client/types/app/bsky/feed/defs.ts index e255b754a7f..7c71435e761 100644 --- a/packages/api/src/client/types/app/bsky/feed/defs.ts +++ b/packages/api/src/client/types/app/bsky/feed/defs.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../actor/defs' import * as AppBskyEmbedImages from '../embed/images' @@ -18,10 +18,11 @@ import * as AppBskyGraphDefs from '../graph/defs' export const id = 'app.bsky.feed.defs' export interface PostView { + $type?: 'app.bsky.feed.defs#postView' uri: string cid: string author: AppBskyActorDefs.ProfileViewBasic - record: {} + record: { [_ in string]: unknown } embed?: | AppBskyEmbedImages.View | AppBskyEmbedVideo.View @@ -37,7 +38,6 @@ export interface PostView { viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] threadgate?: ThreadgateView - [k: string]: unknown } export function isPostView( @@ -52,13 +52,13 @@ export function validatePostView(v: unknown) { /** 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 threadMuted?: boolean replyDisabled?: boolean embeddingDisabled?: boolean pinned?: boolean - [k: string]: unknown } export function isViewerState( @@ -75,12 +75,12 @@ export function validateViewerState(v: unknown) { } export interface FeedViewPost { + $type?: 'app.bsky.feed.defs#feedViewPost' post: PostView reply?: ReplyRef reason?: ReasonRepost | ReasonPin | { $type: string; [k: string]: unknown } /** Context provided by feed generator that may be passed back alongside interactions. */ feedContext?: string - [k: string]: unknown } export function isFeedViewPost( @@ -97,6 +97,7 @@ export function validateFeedViewPost(v: unknown) { } export interface ReplyRef { + $type?: 'app.bsky.feed.defs#replyRef' root: | PostView | NotFoundPost @@ -108,7 +109,6 @@ export interface ReplyRef { | BlockedPost | { $type: string; [k: string]: unknown } grandparentAuthor?: AppBskyActorDefs.ProfileViewBasic - [k: string]: unknown } export function isReplyRef( @@ -122,9 +122,9 @@ export function validateReplyRef(v: unknown) { } export interface ReasonRepost { + $type?: 'app.bsky.feed.defs#reasonRepost' by: AppBskyActorDefs.ProfileViewBasic indexedAt: string - [k: string]: unknown } export function isReasonRepost( @@ -141,7 +141,7 @@ export function validateReasonRepost(v: unknown) { } export interface ReasonPin { - [k: string]: unknown + $type?: 'app.bsky.feed.defs#reasonPin' } export function isReasonPin( @@ -155,6 +155,7 @@ export function validateReasonPin(v: unknown) { } export interface ThreadViewPost { + $type?: 'app.bsky.feed.defs#threadViewPost' post: PostView parent?: | ThreadViewPost @@ -167,7 +168,6 @@ export interface ThreadViewPost { | BlockedPost | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export function isThreadViewPost(v: unknown): v is ThreadViewPost & { @@ -184,9 +184,9 @@ export function validateThreadViewPost(v: unknown) { } export interface NotFoundPost { + $type?: 'app.bsky.feed.defs#notFoundPost' uri: string notFound: true - [k: string]: unknown } export function isNotFoundPost( @@ -203,10 +203,10 @@ export function validateNotFoundPost(v: unknown) { } export interface BlockedPost { + $type?: 'app.bsky.feed.defs#blockedPost' uri: string blocked: true author: BlockedAuthor - [k: string]: unknown } export function isBlockedPost( @@ -223,9 +223,9 @@ export function validateBlockedPost(v: unknown) { } export interface BlockedAuthor { + $type?: 'app.bsky.feed.defs#blockedAuthor' did: string viewer?: AppBskyActorDefs.ViewerState - [k: string]: unknown } export function isBlockedAuthor(v: unknown): v is BlockedAuthor & { @@ -242,6 +242,7 @@ export function validateBlockedAuthor(v: unknown) { } export interface GeneratorView { + $type?: 'app.bsky.feed.defs#generatorView' uri: string cid: string did: string @@ -255,7 +256,6 @@ export interface GeneratorView { labels?: ComAtprotoLabelDefs.Label[] viewer?: GeneratorViewerState indexedAt: string - [k: string]: unknown } export function isGeneratorView(v: unknown): v is GeneratorView & { @@ -272,8 +272,8 @@ export function validateGeneratorView(v: unknown) { } export interface GeneratorViewerState { + $type?: 'app.bsky.feed.defs#generatorViewerState' like?: string - [k: string]: unknown } export function isGeneratorViewerState( @@ -292,6 +292,7 @@ export function validateGeneratorViewerState(v: unknown) { } export interface SkeletonFeedPost { + $type?: 'app.bsky.feed.defs#skeletonFeedPost' post: string reason?: | SkeletonReasonRepost @@ -299,7 +300,6 @@ export interface SkeletonFeedPost { | { $type: string; [k: string]: unknown } /** Context that will be passed through to client and may be passed to feed generator back alongside interactions. */ feedContext?: string - [k: string]: unknown } export function isSkeletonFeedPost(v: unknown): v is SkeletonFeedPost & { @@ -316,8 +316,8 @@ export function validateSkeletonFeedPost(v: unknown) { } export interface SkeletonReasonRepost { + $type?: 'app.bsky.feed.defs#skeletonReasonRepost' repost: string - [k: string]: unknown } export function isSkeletonReasonRepost( @@ -336,7 +336,7 @@ export function validateSkeletonReasonRepost(v: unknown) { } export interface SkeletonReasonPin { - [k: string]: unknown + $type?: 'app.bsky.feed.defs#skeletonReasonPin' } export function isSkeletonReasonPin(v: unknown): v is SkeletonReasonPin & { @@ -353,11 +353,11 @@ export function validateSkeletonReasonPin(v: unknown) { } export interface ThreadgateView { + $type?: 'app.bsky.feed.defs#threadgateView' uri?: string cid?: string - record?: {} + record?: { [_ in string]: unknown } lists?: AppBskyGraphDefs.ListViewBasic[] - [k: string]: unknown } export function isThreadgateView(v: unknown): v is ThreadgateView & { @@ -374,6 +374,7 @@ export function validateThreadgateView(v: unknown) { } export interface Interaction { + $type?: 'app.bsky.feed.defs#interaction' item?: string event?: | 'app.bsky.feed.defs#requestLess' @@ -391,7 +392,6 @@ export interface Interaction { | (string & {}) /** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. */ feedContext?: string - [k: string]: unknown } export function isInteraction( diff --git a/packages/api/src/client/types/app/bsky/feed/describeFeedGenerator.ts b/packages/api/src/client/types/app/bsky/feed/describeFeedGenerator.ts index b58d7fcbe19..aca36c42eb0 100644 --- a/packages/api/src/client/types/app/bsky/feed/describeFeedGenerator.ts +++ b/packages/api/src/client/types/app/bsky/feed/describeFeedGenerator.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.feed.describeFeedGenerator' @@ -17,7 +17,6 @@ export interface OutputSchema { did: string feeds: Feed[] links?: Links - [k: string]: unknown } export interface CallOptions { @@ -36,8 +35,8 @@ export function toKnownErr(e: any) { } export interface Feed { + $type?: 'app.bsky.feed.describeFeedGenerator#feed' uri: string - [k: string]: unknown } export function isFeed( @@ -51,9 +50,9 @@ export function validateFeed(v: unknown) { } export interface Links { + $type?: 'app.bsky.feed.describeFeedGenerator#links' privacyPolicy?: string termsOfService?: string - [k: string]: unknown } export function isLinks(v: unknown): v is Links & { diff --git a/packages/api/src/client/types/app/bsky/feed/generator.ts b/packages/api/src/client/types/app/bsky/feed/generator.ts index a4e2dc830c8..cbb498735f6 100644 --- a/packages/api/src/client/types/app/bsky/feed/generator.ts +++ b/packages/api/src/client/types/app/bsky/feed/generator.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyRichtextFacet from '../richtext/facet' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' @@ -11,6 +11,7 @@ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.feed.generator' export interface Record { + $type?: 'app.bsky.feed.generator' | 'app.bsky.feed.generator#main' did: string displayName: string description?: string diff --git a/packages/api/src/client/types/app/bsky/feed/getActorFeeds.ts b/packages/api/src/client/types/app/bsky/feed/getActorFeeds.ts index bb3249ad85f..11144978e21 100644 --- a/packages/api/src/client/types/app/bsky/feed/getActorFeeds.ts +++ b/packages/api/src/client/types/app/bsky/feed/getActorFeeds.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getActorLikes.ts b/packages/api/src/client/types/app/bsky/feed/getActorLikes.ts index 7e2b4295954..a93b231a461 100644 --- a/packages/api/src/client/types/app/bsky/feed/getActorLikes.ts +++ b/packages/api/src/client/types/app/bsky/feed/getActorLikes.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getAuthorFeed.ts b/packages/api/src/client/types/app/bsky/feed/getAuthorFeed.ts index 3ae1cae26b6..831d3a9f1df 100644 --- a/packages/api/src/client/types/app/bsky/feed/getAuthorFeed.ts +++ b/packages/api/src/client/types/app/bsky/feed/getAuthorFeed.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -29,7 +29,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getFeed.ts b/packages/api/src/client/types/app/bsky/feed/getFeed.ts index 6eaefb58e43..682c765da64 100644 --- a/packages/api/src/client/types/app/bsky/feed/getFeed.ts +++ b/packages/api/src/client/types/app/bsky/feed/getFeed.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getFeedGenerator.ts b/packages/api/src/client/types/app/bsky/feed/getFeedGenerator.ts index 4e9387d34e4..e589c839828 100644 --- a/packages/api/src/client/types/app/bsky/feed/getFeedGenerator.ts +++ b/packages/api/src/client/types/app/bsky/feed/getFeedGenerator.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -23,7 +23,6 @@ export interface OutputSchema { isOnline: boolean /** Indicates whether the feed generator service is compatible with the record declaration. */ isValid: boolean - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getFeedGenerators.ts b/packages/api/src/client/types/app/bsky/feed/getFeedGenerators.ts index 0aa00fe836d..0c3000b3675 100644 --- a/packages/api/src/client/types/app/bsky/feed/getFeedGenerators.ts +++ b/packages/api/src/client/types/app/bsky/feed/getFeedGenerators.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -18,7 +18,6 @@ export type InputSchema = undefined export interface OutputSchema { feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getFeedSkeleton.ts b/packages/api/src/client/types/app/bsky/feed/getFeedSkeleton.ts index 6cc5547ab69..af7ec105ab4 100644 --- a/packages/api/src/client/types/app/bsky/feed/getFeedSkeleton.ts +++ b/packages/api/src/client/types/app/bsky/feed/getFeedSkeleton.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.SkeletonFeedPost[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getLikes.ts b/packages/api/src/client/types/app/bsky/feed/getLikes.ts index 4222b94b2b6..94055065c28 100644 --- a/packages/api/src/client/types/app/bsky/feed/getLikes.ts +++ b/packages/api/src/client/types/app/bsky/feed/getLikes.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../actor/defs' @@ -26,7 +26,6 @@ export interface OutputSchema { cid?: string cursor?: string likes: Like[] - [k: string]: unknown } export interface CallOptions { @@ -45,10 +44,10 @@ export function toKnownErr(e: any) { } export interface Like { + $type?: 'app.bsky.feed.getLikes#like' indexedAt: string createdAt: string actor: AppBskyActorDefs.ProfileView - [k: string]: unknown } export function isLike( diff --git a/packages/api/src/client/types/app/bsky/feed/getListFeed.ts b/packages/api/src/client/types/app/bsky/feed/getListFeed.ts index 616abc6ba8d..7fd554083f3 100644 --- a/packages/api/src/client/types/app/bsky/feed/getListFeed.ts +++ b/packages/api/src/client/types/app/bsky/feed/getListFeed.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getPostThread.ts b/packages/api/src/client/types/app/bsky/feed/getPostThread.ts index cbd94d6e3fb..7e274aac48f 100644 --- a/packages/api/src/client/types/app/bsky/feed/getPostThread.ts +++ b/packages/api/src/client/types/app/bsky/feed/getPostThread.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -28,7 +28,6 @@ export interface OutputSchema { | AppBskyFeedDefs.BlockedPost | { $type: string; [k: string]: unknown } threadgate?: AppBskyFeedDefs.ThreadgateView - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getPosts.ts b/packages/api/src/client/types/app/bsky/feed/getPosts.ts index 62f3a899f0d..521900a8992 100644 --- a/packages/api/src/client/types/app/bsky/feed/getPosts.ts +++ b/packages/api/src/client/types/app/bsky/feed/getPosts.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { posts: AppBskyFeedDefs.PostView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getQuotes.ts b/packages/api/src/client/types/app/bsky/feed/getQuotes.ts index 1ba21be65b3..a5584fbaa96 100644 --- a/packages/api/src/client/types/app/bsky/feed/getQuotes.ts +++ b/packages/api/src/client/types/app/bsky/feed/getQuotes.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -26,7 +26,6 @@ export interface OutputSchema { cid?: string cursor?: string posts: AppBskyFeedDefs.PostView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getRepostedBy.ts b/packages/api/src/client/types/app/bsky/feed/getRepostedBy.ts index 19a6823b9b2..be1972abb25 100644 --- a/packages/api/src/client/types/app/bsky/feed/getRepostedBy.ts +++ b/packages/api/src/client/types/app/bsky/feed/getRepostedBy.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../actor/defs' @@ -26,7 +26,6 @@ export interface OutputSchema { cid?: string cursor?: string repostedBy: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getSuggestedFeeds.ts b/packages/api/src/client/types/app/bsky/feed/getSuggestedFeeds.ts index ff248a18d12..80286bf73b4 100644 --- a/packages/api/src/client/types/app/bsky/feed/getSuggestedFeeds.ts +++ b/packages/api/src/client/types/app/bsky/feed/getSuggestedFeeds.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/getTimeline.ts b/packages/api/src/client/types/app/bsky/feed/getTimeline.ts index 6c7227eb1e5..2c97b7c8c68 100644 --- a/packages/api/src/client/types/app/bsky/feed/getTimeline.ts +++ b/packages/api/src/client/types/app/bsky/feed/getTimeline.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/like.ts b/packages/api/src/client/types/app/bsky/feed/like.ts index ca55513aeb3..5ac0d90fd76 100644 --- a/packages/api/src/client/types/app/bsky/feed/like.ts +++ b/packages/api/src/client/types/app/bsky/feed/like.ts @@ -3,13 +3,14 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.feed.like' export interface Record { + $type?: 'app.bsky.feed.like' | 'app.bsky.feed.like#main' subject: ComAtprotoRepoStrongRef.Main createdAt: string [k: string]: unknown diff --git a/packages/api/src/client/types/app/bsky/feed/post.ts b/packages/api/src/client/types/app/bsky/feed/post.ts index 942e5e08c5b..98a7cb4bf35 100644 --- a/packages/api/src/client/types/app/bsky/feed/post.ts +++ b/packages/api/src/client/types/app/bsky/feed/post.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyRichtextFacet from '../richtext/facet' import * as AppBskyEmbedImages from '../embed/images' @@ -17,6 +17,7 @@ import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.feed.post' export interface Record { + $type?: 'app.bsky.feed.post' | 'app.bsky.feed.post#main' /** The primary post content. May be an empty string, if there are embeds. */ text: string /** DEPRECATED: replaced by app.bsky.richtext.facet. */ @@ -54,9 +55,9 @@ export function validateRecord(v: unknown) { } export interface ReplyRef { + $type?: 'app.bsky.feed.post#replyRef' root: ComAtprotoRepoStrongRef.Main parent: ComAtprotoRepoStrongRef.Main - [k: string]: unknown } export function isReplyRef( @@ -71,11 +72,11 @@ export function validateReplyRef(v: unknown) { /** 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 - [k: string]: unknown } export function isEntity( @@ -90,9 +91,9 @@ export function validateEntity(v: unknown) { /** 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 - [k: string]: unknown } export function isTextSlice( diff --git a/packages/api/src/client/types/app/bsky/feed/postgate.ts b/packages/api/src/client/types/app/bsky/feed/postgate.ts index 79bfef0dab4..310debbcf16 100644 --- a/packages/api/src/client/types/app/bsky/feed/postgate.ts +++ b/packages/api/src/client/types/app/bsky/feed/postgate.ts @@ -3,12 +3,13 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.feed.postgate' export interface Record { + $type?: 'app.bsky.feed.postgate' | 'app.bsky.feed.postgate#main' createdAt: string /** Reference (AT-URI) to the post record. */ post: string @@ -30,7 +31,7 @@ export function validateRecord(v: unknown) { /** Disables embedding of this post. */ export interface DisableRule { - [k: string]: unknown + $type?: 'app.bsky.feed.postgate#disableRule' } export function isDisableRule(v: unknown): v is DisableRule & { diff --git a/packages/api/src/client/types/app/bsky/feed/repost.ts b/packages/api/src/client/types/app/bsky/feed/repost.ts index e56e6dce8c2..845f6696877 100644 --- a/packages/api/src/client/types/app/bsky/feed/repost.ts +++ b/packages/api/src/client/types/app/bsky/feed/repost.ts @@ -3,13 +3,14 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.feed.repost' export interface Record { + $type?: 'app.bsky.feed.repost' | 'app.bsky.feed.repost#main' subject: ComAtprotoRepoStrongRef.Main createdAt: string [k: string]: unknown diff --git a/packages/api/src/client/types/app/bsky/feed/searchPosts.ts b/packages/api/src/client/types/app/bsky/feed/searchPosts.ts index 65dde56fbfc..69e8dcf4131 100644 --- a/packages/api/src/client/types/app/bsky/feed/searchPosts.ts +++ b/packages/api/src/client/types/app/bsky/feed/searchPosts.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -43,7 +43,6 @@ export interface OutputSchema { /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ hitsTotal?: number posts: AppBskyFeedDefs.PostView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/feed/sendInteractions.ts b/packages/api/src/client/types/app/bsky/feed/sendInteractions.ts index 8d4ac0599b7..d35644bb839 100644 --- a/packages/api/src/client/types/app/bsky/feed/sendInteractions.ts +++ b/packages/api/src/client/types/app/bsky/feed/sendInteractions.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from './defs' @@ -14,12 +14,9 @@ export interface QueryParams {} export interface InputSchema { interactions: AppBskyFeedDefs.Interaction[] - [k: string]: unknown } -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export interface CallOptions { signal?: AbortSignal diff --git a/packages/api/src/client/types/app/bsky/feed/threadgate.ts b/packages/api/src/client/types/app/bsky/feed/threadgate.ts index 4a7ed440792..06a0c2a4fd8 100644 --- a/packages/api/src/client/types/app/bsky/feed/threadgate.ts +++ b/packages/api/src/client/types/app/bsky/feed/threadgate.ts @@ -3,12 +3,13 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.feed.threadgate' export interface Record { + $type?: 'app.bsky.feed.threadgate' | 'app.bsky.feed.threadgate#main' /** Reference (AT-URI) to the post record. */ post: string allow?: ( @@ -35,7 +36,7 @@ export function validateRecord(v: unknown) { /** Allow replies from actors mentioned in your post. */ export interface MentionRule { - [k: string]: unknown + $type?: 'app.bsky.feed.threadgate#mentionRule' } export function isMentionRule(v: unknown): v is MentionRule & { @@ -53,7 +54,7 @@ export function validateMentionRule(v: unknown) { /** Allow replies from actors you follow. */ export interface FollowingRule { - [k: string]: unknown + $type?: 'app.bsky.feed.threadgate#followingRule' } export function isFollowingRule(v: unknown): v is FollowingRule & { @@ -71,8 +72,8 @@ export function validateFollowingRule(v: unknown) { /** Allow replies from actors on a list. */ export interface ListRule { + $type?: 'app.bsky.feed.threadgate#listRule' list: string - [k: string]: unknown } export function isListRule( diff --git a/packages/api/src/client/types/app/bsky/graph/block.ts b/packages/api/src/client/types/app/bsky/graph/block.ts index e1b7c39e72b..ca95ee757d5 100644 --- a/packages/api/src/client/types/app/bsky/graph/block.ts +++ b/packages/api/src/client/types/app/bsky/graph/block.ts @@ -3,12 +3,13 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.graph.block' export interface Record { + $type?: 'app.bsky.graph.block' | 'app.bsky.graph.block#main' /** DID of the account to be blocked. */ subject: string createdAt: string diff --git a/packages/api/src/client/types/app/bsky/graph/defs.ts b/packages/api/src/client/types/app/bsky/graph/defs.ts index cc5075df8e7..000e9e2316f 100644 --- a/packages/api/src/client/types/app/bsky/graph/defs.ts +++ b/packages/api/src/client/types/app/bsky/graph/defs.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' import * as AppBskyActorDefs from '../actor/defs' @@ -13,6 +13,7 @@ import * as AppBskyFeedDefs from '../feed/defs' export const id = 'app.bsky.graph.defs' export interface ListViewBasic { + $type?: 'app.bsky.graph.defs#listViewBasic' uri: string cid: string name: string @@ -22,7 +23,6 @@ export interface ListViewBasic { labels?: ComAtprotoLabelDefs.Label[] viewer?: ListViewerState indexedAt?: string - [k: string]: unknown } export function isListViewBasic(v: unknown): v is ListViewBasic & { @@ -39,6 +39,7 @@ export function validateListViewBasic(v: unknown) { } export interface ListView { + $type?: 'app.bsky.graph.defs#listView' uri: string cid: string creator: AppBskyActorDefs.ProfileView @@ -51,7 +52,6 @@ export interface ListView { labels?: ComAtprotoLabelDefs.Label[] viewer?: ListViewerState indexedAt: string - [k: string]: unknown } export function isListView( @@ -65,9 +65,9 @@ export function validateListView(v: unknown) { } export interface ListItemView { + $type?: 'app.bsky.graph.defs#listItemView' uri: string subject: AppBskyActorDefs.ProfileView - [k: string]: unknown } export function isListItemView( @@ -84,9 +84,10 @@ export function validateListItemView(v: unknown) { } export interface StarterPackView { + $type?: 'app.bsky.graph.defs#starterPackView' uri: string cid: string - record: {} + record: { [_ in string]: unknown } creator: AppBskyActorDefs.ProfileViewBasic list?: ListViewBasic listItemsSample?: ListItemView[] @@ -95,7 +96,6 @@ export interface StarterPackView { joinedAllTimeCount?: number labels?: ComAtprotoLabelDefs.Label[] indexedAt: string - [k: string]: unknown } export function isStarterPackView(v: unknown): v is StarterPackView & { @@ -112,16 +112,16 @@ export function validateStarterPackView(v: unknown) { } export interface StarterPackViewBasic { + $type?: 'app.bsky.graph.defs#starterPackViewBasic' uri: string cid: string - record: {} + record: { [_ in string]: unknown } creator: AppBskyActorDefs.ProfileViewBasic listItemCount?: number joinedWeekCount?: number joinedAllTimeCount?: number labels?: ComAtprotoLabelDefs.Label[] indexedAt: string - [k: string]: unknown } export function isStarterPackViewBasic( @@ -153,9 +153,9 @@ export const CURATELIST = 'app.bsky.graph.defs#curatelist' export const REFERENCELIST = 'app.bsky.graph.defs#referencelist' export interface ListViewerState { + $type?: 'app.bsky.graph.defs#listViewerState' muted?: boolean blocked?: string - [k: string]: unknown } export function isListViewerState(v: unknown): v is ListViewerState & { @@ -173,9 +173,9 @@ export function validateListViewerState(v: unknown) { /** indicates that a handle or DID could not be resolved */ export interface NotFoundActor { + $type?: 'app.bsky.graph.defs#notFoundActor' actor: string notFound: true - [k: string]: unknown } export function isNotFoundActor(v: unknown): v is NotFoundActor & { @@ -193,12 +193,12 @@ export function validateNotFoundActor(v: unknown) { /** 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 - [k: string]: unknown } export function isRelationship( diff --git a/packages/api/src/client/types/app/bsky/graph/follow.ts b/packages/api/src/client/types/app/bsky/graph/follow.ts index 245bce4e25c..8b6cadd7cd8 100644 --- a/packages/api/src/client/types/app/bsky/graph/follow.ts +++ b/packages/api/src/client/types/app/bsky/graph/follow.ts @@ -3,12 +3,13 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.graph.follow' export interface Record { + $type?: 'app.bsky.graph.follow' | 'app.bsky.graph.follow#main' subject: string createdAt: string [k: string]: unknown diff --git a/packages/api/src/client/types/app/bsky/graph/getActorStarterPacks.ts b/packages/api/src/client/types/app/bsky/graph/getActorStarterPacks.ts index 8ceb92954d9..7b242c6ba77 100644 --- a/packages/api/src/client/types/app/bsky/graph/getActorStarterPacks.ts +++ b/packages/api/src/client/types/app/bsky/graph/getActorStarterPacks.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyGraphDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string starterPacks: AppBskyGraphDefs.StarterPackViewBasic[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getBlocks.ts b/packages/api/src/client/types/app/bsky/graph/getBlocks.ts index c2328a7d4dd..286bda4451e 100644 --- a/packages/api/src/client/types/app/bsky/graph/getBlocks.ts +++ b/packages/api/src/client/types/app/bsky/graph/getBlocks.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../actor/defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string blocks: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getFollowers.ts b/packages/api/src/client/types/app/bsky/graph/getFollowers.ts index f2db7664e42..859606e1005 100644 --- a/packages/api/src/client/types/app/bsky/graph/getFollowers.ts +++ b/packages/api/src/client/types/app/bsky/graph/getFollowers.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../actor/defs' @@ -22,7 +22,6 @@ export interface OutputSchema { subject: AppBskyActorDefs.ProfileView cursor?: string followers: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getFollows.ts b/packages/api/src/client/types/app/bsky/graph/getFollows.ts index d22fd464617..d9dc2c104a8 100644 --- a/packages/api/src/client/types/app/bsky/graph/getFollows.ts +++ b/packages/api/src/client/types/app/bsky/graph/getFollows.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../actor/defs' @@ -22,7 +22,6 @@ export interface OutputSchema { subject: AppBskyActorDefs.ProfileView cursor?: string follows: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getKnownFollowers.ts b/packages/api/src/client/types/app/bsky/graph/getKnownFollowers.ts index 85490e782a3..4f0159d3e43 100644 --- a/packages/api/src/client/types/app/bsky/graph/getKnownFollowers.ts +++ b/packages/api/src/client/types/app/bsky/graph/getKnownFollowers.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../actor/defs' @@ -22,7 +22,6 @@ export interface OutputSchema { subject: AppBskyActorDefs.ProfileView cursor?: string followers: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getList.ts b/packages/api/src/client/types/app/bsky/graph/getList.ts index d19803b4abe..add614c7f13 100644 --- a/packages/api/src/client/types/app/bsky/graph/getList.ts +++ b/packages/api/src/client/types/app/bsky/graph/getList.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyGraphDefs from './defs' @@ -23,7 +23,6 @@ export interface OutputSchema { cursor?: string list: AppBskyGraphDefs.ListView items: AppBskyGraphDefs.ListItemView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getListBlocks.ts b/packages/api/src/client/types/app/bsky/graph/getListBlocks.ts index c9e40a872dc..f69736c4e0e 100644 --- a/packages/api/src/client/types/app/bsky/graph/getListBlocks.ts +++ b/packages/api/src/client/types/app/bsky/graph/getListBlocks.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyGraphDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string lists: AppBskyGraphDefs.ListView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getListMutes.ts b/packages/api/src/client/types/app/bsky/graph/getListMutes.ts index 7f4855aa183..9fbe258e25d 100644 --- a/packages/api/src/client/types/app/bsky/graph/getListMutes.ts +++ b/packages/api/src/client/types/app/bsky/graph/getListMutes.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyGraphDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string lists: AppBskyGraphDefs.ListView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getLists.ts b/packages/api/src/client/types/app/bsky/graph/getLists.ts index b865cfec269..75f7ac33bae 100644 --- a/packages/api/src/client/types/app/bsky/graph/getLists.ts +++ b/packages/api/src/client/types/app/bsky/graph/getLists.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyGraphDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string lists: AppBskyGraphDefs.ListView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getMutes.ts b/packages/api/src/client/types/app/bsky/graph/getMutes.ts index 747c8240986..64a5f545327 100644 --- a/packages/api/src/client/types/app/bsky/graph/getMutes.ts +++ b/packages/api/src/client/types/app/bsky/graph/getMutes.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../actor/defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string mutes: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getRelationships.ts b/packages/api/src/client/types/app/bsky/graph/getRelationships.ts index 10a24ec0a4b..83d3cc474ce 100644 --- a/packages/api/src/client/types/app/bsky/graph/getRelationships.ts +++ b/packages/api/src/client/types/app/bsky/graph/getRelationships.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyGraphDefs from './defs' @@ -26,7 +26,6 @@ export interface OutputSchema { | AppBskyGraphDefs.NotFoundActor | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getStarterPack.ts b/packages/api/src/client/types/app/bsky/graph/getStarterPack.ts index e5b46724ce5..c2b8a35f4e0 100644 --- a/packages/api/src/client/types/app/bsky/graph/getStarterPack.ts +++ b/packages/api/src/client/types/app/bsky/graph/getStarterPack.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyGraphDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { starterPack: AppBskyGraphDefs.StarterPackView - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getStarterPacks.ts b/packages/api/src/client/types/app/bsky/graph/getStarterPacks.ts index 1a2d9edbfa0..14a614f1d64 100644 --- a/packages/api/src/client/types/app/bsky/graph/getStarterPacks.ts +++ b/packages/api/src/client/types/app/bsky/graph/getStarterPacks.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyGraphDefs from './defs' @@ -18,7 +18,6 @@ export type InputSchema = undefined export interface OutputSchema { starterPacks: AppBskyGraphDefs.StarterPackViewBasic[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts b/packages/api/src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts index 4e2142cf2f8..b628eb78ab5 100644 --- a/packages/api/src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts +++ b/packages/api/src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../actor/defs' @@ -20,7 +20,6 @@ export interface OutputSchema { suggestions: AppBskyActorDefs.ProfileView[] /** If true, response has fallen-back to generic results, and is not scoped using relativeToDid */ isFallback: boolean - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/list.ts b/packages/api/src/client/types/app/bsky/graph/list.ts index dad4e7b73f1..f2aafa5b70f 100644 --- a/packages/api/src/client/types/app/bsky/graph/list.ts +++ b/packages/api/src/client/types/app/bsky/graph/list.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyGraphDefs from './defs' import * as AppBskyRichtextFacet from '../richtext/facet' @@ -12,6 +12,7 @@ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.graph.list' export interface Record { + $type?: 'app.bsky.graph.list' | 'app.bsky.graph.list#main' purpose: AppBskyGraphDefs.ListPurpose /** Display name for list; can not be empty. */ name: string diff --git a/packages/api/src/client/types/app/bsky/graph/listblock.ts b/packages/api/src/client/types/app/bsky/graph/listblock.ts index 07d1c2f4bd8..6d966250ff3 100644 --- a/packages/api/src/client/types/app/bsky/graph/listblock.ts +++ b/packages/api/src/client/types/app/bsky/graph/listblock.ts @@ -3,12 +3,13 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.graph.listblock' export interface Record { + $type?: 'app.bsky.graph.listblock' | 'app.bsky.graph.listblock#main' /** Reference (AT-URI) to the mod list record. */ subject: string createdAt: string diff --git a/packages/api/src/client/types/app/bsky/graph/listitem.ts b/packages/api/src/client/types/app/bsky/graph/listitem.ts index 49b50212d66..f235d93f4e9 100644 --- a/packages/api/src/client/types/app/bsky/graph/listitem.ts +++ b/packages/api/src/client/types/app/bsky/graph/listitem.ts @@ -3,12 +3,13 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.graph.listitem' export interface Record { + $type?: 'app.bsky.graph.listitem' | 'app.bsky.graph.listitem#main' /** The account which is included on the list. */ subject: string /** Reference (AT-URI) to the list record (app.bsky.graph.list). */ diff --git a/packages/api/src/client/types/app/bsky/graph/muteActor.ts b/packages/api/src/client/types/app/bsky/graph/muteActor.ts index 8db52159b3e..ce92b2e51c7 100644 --- a/packages/api/src/client/types/app/bsky/graph/muteActor.ts +++ b/packages/api/src/client/types/app/bsky/graph/muteActor.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.graph.muteActor' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { actor: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/muteActorList.ts b/packages/api/src/client/types/app/bsky/graph/muteActorList.ts index 210b57e7f51..ea770f34969 100644 --- a/packages/api/src/client/types/app/bsky/graph/muteActorList.ts +++ b/packages/api/src/client/types/app/bsky/graph/muteActorList.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.graph.muteActorList' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { list: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/muteThread.ts b/packages/api/src/client/types/app/bsky/graph/muteThread.ts index eb91bb8dffb..c1605aa8e1b 100644 --- a/packages/api/src/client/types/app/bsky/graph/muteThread.ts +++ b/packages/api/src/client/types/app/bsky/graph/muteThread.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.graph.muteThread' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { root: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/starterpack.ts b/packages/api/src/client/types/app/bsky/graph/starterpack.ts index 609c4050e98..5dfe3f17bd4 100644 --- a/packages/api/src/client/types/app/bsky/graph/starterpack.ts +++ b/packages/api/src/client/types/app/bsky/graph/starterpack.ts @@ -3,13 +3,14 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyRichtextFacet from '../richtext/facet' export const id = 'app.bsky.graph.starterpack' export interface Record { + $type?: 'app.bsky.graph.starterpack' | 'app.bsky.graph.starterpack#main' /** Display name for starter pack; can not be empty. */ name: string description?: string @@ -32,8 +33,8 @@ export function validateRecord(v: unknown) { } export interface FeedItem { + $type?: 'app.bsky.graph.starterpack#feedItem' uri: string - [k: string]: unknown } export function isFeedItem( diff --git a/packages/api/src/client/types/app/bsky/graph/unmuteActor.ts b/packages/api/src/client/types/app/bsky/graph/unmuteActor.ts index 4a5b3d7bf5b..46c1fa53328 100644 --- a/packages/api/src/client/types/app/bsky/graph/unmuteActor.ts +++ b/packages/api/src/client/types/app/bsky/graph/unmuteActor.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.graph.unmuteActor' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { actor: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/unmuteActorList.ts b/packages/api/src/client/types/app/bsky/graph/unmuteActorList.ts index 815b4864c63..18835970256 100644 --- a/packages/api/src/client/types/app/bsky/graph/unmuteActorList.ts +++ b/packages/api/src/client/types/app/bsky/graph/unmuteActorList.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.graph.unmuteActorList' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { list: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/graph/unmuteThread.ts b/packages/api/src/client/types/app/bsky/graph/unmuteThread.ts index d5b7abd12a4..996cfcb5dac 100644 --- a/packages/api/src/client/types/app/bsky/graph/unmuteThread.ts +++ b/packages/api/src/client/types/app/bsky/graph/unmuteThread.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.graph.unmuteThread' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { root: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/labeler/defs.ts b/packages/api/src/client/types/app/bsky/labeler/defs.ts index a997438bf75..5bcb15b616e 100644 --- a/packages/api/src/client/types/app/bsky/labeler/defs.ts +++ b/packages/api/src/client/types/app/bsky/labeler/defs.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../actor/defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' @@ -11,6 +11,7 @@ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.labeler.defs' export interface LabelerView { + $type?: 'app.bsky.labeler.defs#labelerView' uri: string cid: string creator: AppBskyActorDefs.ProfileView @@ -18,7 +19,6 @@ export interface LabelerView { viewer?: LabelerViewerState indexedAt: string labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isLabelerView( @@ -35,6 +35,7 @@ export function validateLabelerView(v: unknown) { } export interface LabelerViewDetailed { + $type?: 'app.bsky.labeler.defs#labelerViewDetailed' uri: string cid: string creator: AppBskyActorDefs.ProfileView @@ -43,7 +44,6 @@ export interface LabelerViewDetailed { viewer?: LabelerViewerState indexedAt: string labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isLabelerViewDetailed(v: unknown): v is LabelerViewDetailed & { @@ -60,8 +60,8 @@ export function validateLabelerViewDetailed(v: unknown) { } export interface LabelerViewerState { + $type?: 'app.bsky.labeler.defs#labelerViewerState' like?: string - [k: string]: unknown } export function isLabelerViewerState(v: unknown): v is LabelerViewerState & { @@ -78,11 +78,11 @@ export function validateLabelerViewerState(v: unknown) { } 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[] - [k: string]: unknown } export function isLabelerPolicies(v: unknown): v is LabelerPolicies & { diff --git a/packages/api/src/client/types/app/bsky/labeler/getServices.ts b/packages/api/src/client/types/app/bsky/labeler/getServices.ts index 45a2bd60ae1..4efa6ef7050 100644 --- a/packages/api/src/client/types/app/bsky/labeler/getServices.ts +++ b/packages/api/src/client/types/app/bsky/labeler/getServices.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyLabelerDefs from './defs' @@ -23,7 +23,6 @@ export interface OutputSchema { | AppBskyLabelerDefs.LabelerViewDetailed | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/labeler/service.ts b/packages/api/src/client/types/app/bsky/labeler/service.ts index 14afb445cc6..cc32c0d50f8 100644 --- a/packages/api/src/client/types/app/bsky/labeler/service.ts +++ b/packages/api/src/client/types/app/bsky/labeler/service.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyLabelerDefs from './defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' @@ -11,6 +11,7 @@ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.labeler.service' export interface Record { + $type?: 'app.bsky.labeler.service' | 'app.bsky.labeler.service#main' policies: AppBskyLabelerDefs.LabelerPolicies labels?: | ComAtprotoLabelDefs.SelfLabels diff --git a/packages/api/src/client/types/app/bsky/notification/getUnreadCount.ts b/packages/api/src/client/types/app/bsky/notification/getUnreadCount.ts index 11bb1adf9e3..d1546be2a3b 100644 --- a/packages/api/src/client/types/app/bsky/notification/getUnreadCount.ts +++ b/packages/api/src/client/types/app/bsky/notification/getUnreadCount.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.notification.getUnreadCount' @@ -18,7 +18,6 @@ export type InputSchema = undefined export interface OutputSchema { count: number - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/notification/listNotifications.ts b/packages/api/src/client/types/app/bsky/notification/listNotifications.ts index db48e5277d1..20bc1b4cae4 100644 --- a/packages/api/src/client/types/app/bsky/notification/listNotifications.ts +++ b/packages/api/src/client/types/app/bsky/notification/listNotifications.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../actor/defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' @@ -25,7 +25,6 @@ export interface OutputSchema { notifications: Notification[] priority?: boolean seenAt?: string - [k: string]: unknown } export interface CallOptions { @@ -44,6 +43,7 @@ export function toKnownErr(e: any) { } export interface Notification { + $type?: 'app.bsky.notification.listNotifications#notification' uri: string cid: string author: AppBskyActorDefs.ProfileView @@ -58,11 +58,10 @@ export interface Notification { | 'starterpack-joined' | (string & {}) reasonSubject?: string - record: {} + record: { [_ in string]: unknown } isRead: boolean indexedAt: string labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isNotification(v: unknown): v is Notification & { diff --git a/packages/api/src/client/types/app/bsky/notification/putPreferences.ts b/packages/api/src/client/types/app/bsky/notification/putPreferences.ts index 2499eba8fa3..879e538af4d 100644 --- a/packages/api/src/client/types/app/bsky/notification/putPreferences.ts +++ b/packages/api/src/client/types/app/bsky/notification/putPreferences.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.notification.putPreferences' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { priority: boolean - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/notification/registerPush.ts b/packages/api/src/client/types/app/bsky/notification/registerPush.ts index 06d8806165f..20b6dc06cde 100644 --- a/packages/api/src/client/types/app/bsky/notification/registerPush.ts +++ b/packages/api/src/client/types/app/bsky/notification/registerPush.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.notification.registerPush' @@ -16,7 +16,6 @@ export interface InputSchema { token: string platform: 'ios' | 'android' | 'web' | (string & {}) appId: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/notification/updateSeen.ts b/packages/api/src/client/types/app/bsky/notification/updateSeen.ts index 64aac3c7c90..3fba8c394ba 100644 --- a/packages/api/src/client/types/app/bsky/notification/updateSeen.ts +++ b/packages/api/src/client/types/app/bsky/notification/updateSeen.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.notification.updateSeen' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { seenAt: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/richtext/facet.ts b/packages/api/src/client/types/app/bsky/richtext/facet.ts index f7a0ad8c949..3de00bddf39 100644 --- a/packages/api/src/client/types/app/bsky/richtext/facet.ts +++ b/packages/api/src/client/types/app/bsky/richtext/facet.ts @@ -3,16 +3,16 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.richtext.facet' /** Annotation of a sub-string within rich text. */ export interface Main { + $type?: 'app.bsky.richtext.facet' | 'app.bsky.richtext.facet#main' index: ByteSlice features: (Mention | Link | Tag | { $type: string; [k: string]: unknown })[] - [k: string]: unknown } export function isMain( @@ -27,8 +27,8 @@ export function validateMain(v: unknown) { /** 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 - [k: string]: unknown } export function isMention( @@ -43,8 +43,8 @@ export function validateMention(v: unknown) { /** 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 - [k: string]: unknown } export function isLink( @@ -59,8 +59,8 @@ export function validateLink(v: unknown) { /** 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 - [k: string]: unknown } export function isTag( @@ -75,9 +75,9 @@ export function validateTag(v: unknown) { /** 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 - [k: string]: unknown } export function isByteSlice( diff --git a/packages/api/src/client/types/app/bsky/unspecced/defs.ts b/packages/api/src/client/types/app/bsky/unspecced/defs.ts index f05aacd324a..c6eb500dc61 100644 --- a/packages/api/src/client/types/app/bsky/unspecced/defs.ts +++ b/packages/api/src/client/types/app/bsky/unspecced/defs.ts @@ -3,14 +3,14 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.unspecced.defs' export interface SkeletonSearchPost { + $type?: 'app.bsky.unspecced.defs#skeletonSearchPost' uri: string - [k: string]: unknown } export function isSkeletonSearchPost(v: unknown): v is SkeletonSearchPost & { @@ -27,8 +27,8 @@ export function validateSkeletonSearchPost(v: unknown) { } export interface SkeletonSearchActor { + $type?: 'app.bsky.unspecced.defs#skeletonSearchActor' did: string - [k: string]: unknown } export function isSkeletonSearchActor(v: unknown): v is SkeletonSearchActor & { diff --git a/packages/api/src/client/types/app/bsky/unspecced/getConfig.ts b/packages/api/src/client/types/app/bsky/unspecced/getConfig.ts index fc15923bb97..117a1fc189e 100644 --- a/packages/api/src/client/types/app/bsky/unspecced/getConfig.ts +++ b/packages/api/src/client/types/app/bsky/unspecced/getConfig.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.unspecced.getConfig' @@ -15,7 +15,6 @@ export type InputSchema = undefined export interface OutputSchema { checkEmailConfirmed?: boolean - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts b/packages/api/src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts index fd7dabd3ebe..7d0ea911206 100644 --- a/packages/api/src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts +++ b/packages/api/src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyFeedDefs from '../feed/defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestionsSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestionsSkeleton.ts index 68e36e7497d..9d4bd0d635c 100644 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestionsSkeleton.ts +++ b/packages/api/src/client/types/app/bsky/unspecced/getSuggestionsSkeleton.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyUnspeccedDefs from './defs' @@ -26,7 +26,6 @@ export interface OutputSchema { 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 - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/unspecced/getTaggedSuggestions.ts b/packages/api/src/client/types/app/bsky/unspecced/getTaggedSuggestions.ts index 7a3651b192f..1dbcde00741 100644 --- a/packages/api/src/client/types/app/bsky/unspecced/getTaggedSuggestions.ts +++ b/packages/api/src/client/types/app/bsky/unspecced/getTaggedSuggestions.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.unspecced.getTaggedSuggestions' @@ -15,7 +15,6 @@ export type InputSchema = undefined export interface OutputSchema { suggestions: Suggestion[] - [k: string]: unknown } export interface CallOptions { @@ -34,10 +33,10 @@ export function toKnownErr(e: any) { } export interface Suggestion { + $type?: 'app.bsky.unspecced.getTaggedSuggestions#suggestion' tag: string subjectType: 'actor' | 'feed' | (string & {}) subject: string - [k: string]: unknown } export function isSuggestion(v: unknown): v is Suggestion & { diff --git a/packages/api/src/client/types/app/bsky/unspecced/searchActorsSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/searchActorsSkeleton.ts index 6056d5971ef..845bce273c5 100644 --- a/packages/api/src/client/types/app/bsky/unspecced/searchActorsSkeleton.ts +++ b/packages/api/src/client/types/app/bsky/unspecced/searchActorsSkeleton.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyUnspeccedDefs from './defs' @@ -29,7 +29,6 @@ export interface OutputSchema { /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ hitsTotal?: number actors: AppBskyUnspeccedDefs.SkeletonSearchActor[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/unspecced/searchPostsSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/searchPostsSkeleton.ts index 5ee5fe6ec78..9ffcacd1cdd 100644 --- a/packages/api/src/client/types/app/bsky/unspecced/searchPostsSkeleton.ts +++ b/packages/api/src/client/types/app/bsky/unspecced/searchPostsSkeleton.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyUnspeccedDefs from './defs' @@ -45,7 +45,6 @@ export interface OutputSchema { /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ hitsTotal?: number posts: AppBskyUnspeccedDefs.SkeletonSearchPost[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/video/defs.ts b/packages/api/src/client/types/app/bsky/video/defs.ts index 4a9754f8c3b..1b848b50c43 100644 --- a/packages/api/src/client/types/app/bsky/video/defs.ts +++ b/packages/api/src/client/types/app/bsky/video/defs.ts @@ -3,12 +3,13 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export 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. */ @@ -18,7 +19,6 @@ export interface JobStatus { blob?: BlobRef error?: string message?: string - [k: string]: unknown } export function isJobStatus( diff --git a/packages/api/src/client/types/app/bsky/video/getJobStatus.ts b/packages/api/src/client/types/app/bsky/video/getJobStatus.ts index ebdf401bd86..527214eb3ec 100644 --- a/packages/api/src/client/types/app/bsky/video/getJobStatus.ts +++ b/packages/api/src/client/types/app/bsky/video/getJobStatus.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyVideoDefs from './defs' @@ -18,7 +18,6 @@ export type InputSchema = undefined export interface OutputSchema { jobStatus: AppBskyVideoDefs.JobStatus - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/video/getUploadLimits.ts b/packages/api/src/client/types/app/bsky/video/getUploadLimits.ts index 6b342c675f7..038f82e02cc 100644 --- a/packages/api/src/client/types/app/bsky/video/getUploadLimits.ts +++ b/packages/api/src/client/types/app/bsky/video/getUploadLimits.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'app.bsky.video.getUploadLimits' @@ -19,7 +19,6 @@ export interface OutputSchema { remainingDailyBytes?: number message?: string error?: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/app/bsky/video/uploadVideo.ts b/packages/api/src/client/types/app/bsky/video/uploadVideo.ts index fb502d54edd..42a846ff695 100644 --- a/packages/api/src/client/types/app/bsky/video/uploadVideo.ts +++ b/packages/api/src/client/types/app/bsky/video/uploadVideo.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyVideoDefs from './defs' @@ -16,7 +16,6 @@ export type InputSchema = string | Uint8Array | Blob export interface OutputSchema { jobStatus: AppBskyVideoDefs.JobStatus - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/chat/bsky/actor/declaration.ts b/packages/api/src/client/types/chat/bsky/actor/declaration.ts index 5a4ddc641bf..07d30e88c78 100644 --- a/packages/api/src/client/types/chat/bsky/actor/declaration.ts +++ b/packages/api/src/client/types/chat/bsky/actor/declaration.ts @@ -3,12 +3,13 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'chat.bsky.actor.declaration' export interface Record { + $type?: 'chat.bsky.actor.declaration' | 'chat.bsky.actor.declaration#main' allowIncoming: 'all' | 'none' | 'following' | (string & {}) [k: string]: unknown } diff --git a/packages/api/src/client/types/chat/bsky/actor/defs.ts b/packages/api/src/client/types/chat/bsky/actor/defs.ts index c2e168966f2..4ccdfcf0e1b 100644 --- a/packages/api/src/client/types/chat/bsky/actor/defs.ts +++ b/packages/api/src/client/types/chat/bsky/actor/defs.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../../../app/bsky/actor/defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' @@ -11,6 +11,7 @@ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'chat.bsky.actor.defs' export interface ProfileViewBasic { + $type?: 'chat.bsky.actor.defs#profileViewBasic' did: string handle: string displayName?: string @@ -20,7 +21,6 @@ export interface ProfileViewBasic { labels?: ComAtprotoLabelDefs.Label[] /** Set to true when the actor cannot actively participate in converations */ chatDisabled?: boolean - [k: string]: unknown } export function isProfileViewBasic(v: unknown): v is ProfileViewBasic & { diff --git a/packages/api/src/client/types/chat/bsky/actor/deleteAccount.ts b/packages/api/src/client/types/chat/bsky/actor/deleteAccount.ts index 32efca00eb4..73f58d13ebb 100644 --- a/packages/api/src/client/types/chat/bsky/actor/deleteAccount.ts +++ b/packages/api/src/client/types/chat/bsky/actor/deleteAccount.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'chat.bsky.actor.deleteAccount' @@ -13,9 +13,7 @@ export interface QueryParams {} export type InputSchema = undefined -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export interface CallOptions { signal?: AbortSignal diff --git a/packages/api/src/client/types/chat/bsky/actor/exportAccountData.ts b/packages/api/src/client/types/chat/bsky/actor/exportAccountData.ts index 519e0ac93d8..80c60afa00f 100644 --- a/packages/api/src/client/types/chat/bsky/actor/exportAccountData.ts +++ b/packages/api/src/client/types/chat/bsky/actor/exportAccountData.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'chat.bsky.actor.exportAccountData' diff --git a/packages/api/src/client/types/chat/bsky/convo/defs.ts b/packages/api/src/client/types/chat/bsky/convo/defs.ts index 576970a0b3a..3a905918353 100644 --- a/packages/api/src/client/types/chat/bsky/convo/defs.ts +++ b/packages/api/src/client/types/chat/bsky/convo/defs.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyRichtextFacet from '../../../app/bsky/richtext/facet' import * as AppBskyEmbedRecord from '../../../app/bsky/embed/record' @@ -12,10 +12,10 @@ import * as ChatBskyActorDefs from '../actor/defs' export const id = 'chat.bsky.convo.defs' export interface MessageRef { + $type?: 'chat.bsky.convo.defs#messageRef' did: string convoId: string messageId: string - [k: string]: unknown } export function isMessageRef( @@ -32,11 +32,11 @@ export function validateMessageRef(v: unknown) { } export interface MessageInput { + $type?: 'chat.bsky.convo.defs#messageInput' text: string /** Annotations of text (mentions, URLs, hashtags, etc) */ facets?: AppBskyRichtextFacet.Main[] embed?: AppBskyEmbedRecord.Main | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isMessageInput(v: unknown): v is MessageInput & { @@ -53,6 +53,7 @@ export function validateMessageInput(v: unknown) { } export interface MessageView { + $type?: 'chat.bsky.convo.defs#messageView' id: string rev: string text: string @@ -61,7 +62,6 @@ export interface MessageView { embed?: AppBskyEmbedRecord.View | { $type: string; [k: string]: unknown } sender: MessageViewSender sentAt: string - [k: string]: unknown } export function isMessageView( @@ -78,11 +78,11 @@ export function validateMessageView(v: unknown) { } export interface DeletedMessageView { + $type?: 'chat.bsky.convo.defs#deletedMessageView' id: string rev: string sender: MessageViewSender sentAt: string - [k: string]: unknown } export function isDeletedMessageView(v: unknown): v is DeletedMessageView & { @@ -99,8 +99,8 @@ export function validateDeletedMessageView(v: unknown) { } export interface MessageViewSender { + $type?: 'chat.bsky.convo.defs#messageViewSender' did: string - [k: string]: unknown } export function isMessageViewSender(v: unknown): v is MessageViewSender & { @@ -117,6 +117,7 @@ export function validateMessageViewSender(v: unknown) { } export interface ConvoView { + $type?: 'chat.bsky.convo.defs#convoView' id: string rev: string members: ChatBskyActorDefs.ProfileViewBasic[] @@ -127,7 +128,6 @@ export interface ConvoView { muted: boolean opened?: boolean unreadCount: number - [k: string]: unknown } export function isConvoView( @@ -141,9 +141,9 @@ export function validateConvoView(v: unknown) { } export interface LogBeginConvo { + $type?: 'chat.bsky.convo.defs#logBeginConvo' rev: string convoId: string - [k: string]: unknown } export function isLogBeginConvo(v: unknown): v is LogBeginConvo & { @@ -160,9 +160,9 @@ export function validateLogBeginConvo(v: unknown) { } export interface LogLeaveConvo { + $type?: 'chat.bsky.convo.defs#logLeaveConvo' rev: string convoId: string - [k: string]: unknown } export function isLogLeaveConvo(v: unknown): v is LogLeaveConvo & { @@ -179,13 +179,13 @@ export function validateLogLeaveConvo(v: unknown) { } export interface LogCreateMessage { + $type?: 'chat.bsky.convo.defs#logCreateMessage' rev: string convoId: string message: | MessageView | DeletedMessageView | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isLogCreateMessage(v: unknown): v is LogCreateMessage & { @@ -202,13 +202,13 @@ export function validateLogCreateMessage(v: unknown) { } export interface LogDeleteMessage { + $type?: 'chat.bsky.convo.defs#logDeleteMessage' rev: string convoId: string message: | MessageView | DeletedMessageView | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isLogDeleteMessage(v: unknown): v is LogDeleteMessage & { diff --git a/packages/api/src/client/types/chat/bsky/convo/deleteMessageForSelf.ts b/packages/api/src/client/types/chat/bsky/convo/deleteMessageForSelf.ts index b29dfc72c0f..c7b16e50ee6 100644 --- a/packages/api/src/client/types/chat/bsky/convo/deleteMessageForSelf.ts +++ b/packages/api/src/client/types/chat/bsky/convo/deleteMessageForSelf.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ChatBskyConvoDefs from './defs' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { convoId: string messageId: string - [k: string]: unknown } export type OutputSchema = ChatBskyConvoDefs.DeletedMessageView diff --git a/packages/api/src/client/types/chat/bsky/convo/getConvo.ts b/packages/api/src/client/types/chat/bsky/convo/getConvo.ts index 8ba84933892..11581f5e20e 100644 --- a/packages/api/src/client/types/chat/bsky/convo/getConvo.ts +++ b/packages/api/src/client/types/chat/bsky/convo/getConvo.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ChatBskyConvoDefs from './defs' @@ -18,7 +18,6 @@ export type InputSchema = undefined export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/chat/bsky/convo/getConvoForMembers.ts b/packages/api/src/client/types/chat/bsky/convo/getConvoForMembers.ts index 91a220ed558..8a21e9fcc11 100644 --- a/packages/api/src/client/types/chat/bsky/convo/getConvoForMembers.ts +++ b/packages/api/src/client/types/chat/bsky/convo/getConvoForMembers.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ChatBskyConvoDefs from './defs' @@ -18,7 +18,6 @@ export type InputSchema = undefined export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/chat/bsky/convo/getLog.ts b/packages/api/src/client/types/chat/bsky/convo/getLog.ts index a84763c3c72..9887c0e0740 100644 --- a/packages/api/src/client/types/chat/bsky/convo/getLog.ts +++ b/packages/api/src/client/types/chat/bsky/convo/getLog.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ChatBskyConvoDefs from './defs' @@ -25,7 +25,6 @@ export interface OutputSchema { | ChatBskyConvoDefs.LogDeleteMessage | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/chat/bsky/convo/getMessages.ts b/packages/api/src/client/types/chat/bsky/convo/getMessages.ts index 4cdf560dfe1..bff39e51a80 100644 --- a/packages/api/src/client/types/chat/bsky/convo/getMessages.ts +++ b/packages/api/src/client/types/chat/bsky/convo/getMessages.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ChatBskyConvoDefs from './defs' @@ -25,7 +25,6 @@ export interface OutputSchema { | ChatBskyConvoDefs.DeletedMessageView | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/chat/bsky/convo/leaveConvo.ts b/packages/api/src/client/types/chat/bsky/convo/leaveConvo.ts index 2aa4a21690f..20b74e3ef17 100644 --- a/packages/api/src/client/types/chat/bsky/convo/leaveConvo.ts +++ b/packages/api/src/client/types/chat/bsky/convo/leaveConvo.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'chat.bsky.convo.leaveConvo' @@ -13,13 +13,11 @@ export interface QueryParams {} export interface InputSchema { convoId: string - [k: string]: unknown } export interface OutputSchema { convoId: string rev: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/chat/bsky/convo/listConvos.ts b/packages/api/src/client/types/chat/bsky/convo/listConvos.ts index 99313f78385..b9d973843a5 100644 --- a/packages/api/src/client/types/chat/bsky/convo/listConvos.ts +++ b/packages/api/src/client/types/chat/bsky/convo/listConvos.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ChatBskyConvoDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string convos: ChatBskyConvoDefs.ConvoView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/chat/bsky/convo/muteConvo.ts b/packages/api/src/client/types/chat/bsky/convo/muteConvo.ts index d7431dacfae..361f9d6e55a 100644 --- a/packages/api/src/client/types/chat/bsky/convo/muteConvo.ts +++ b/packages/api/src/client/types/chat/bsky/convo/muteConvo.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ChatBskyConvoDefs from './defs' @@ -14,12 +14,10 @@ export interface QueryParams {} export interface InputSchema { convoId: string - [k: string]: unknown } export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/chat/bsky/convo/sendMessage.ts b/packages/api/src/client/types/chat/bsky/convo/sendMessage.ts index b61f147bc1c..9032d3594f3 100644 --- a/packages/api/src/client/types/chat/bsky/convo/sendMessage.ts +++ b/packages/api/src/client/types/chat/bsky/convo/sendMessage.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ChatBskyConvoDefs from './defs' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { convoId: string message: ChatBskyConvoDefs.MessageInput - [k: string]: unknown } export type OutputSchema = ChatBskyConvoDefs.MessageView diff --git a/packages/api/src/client/types/chat/bsky/convo/sendMessageBatch.ts b/packages/api/src/client/types/chat/bsky/convo/sendMessageBatch.ts index dfbcdaf4848..bfae4ec8ef3 100644 --- a/packages/api/src/client/types/chat/bsky/convo/sendMessageBatch.ts +++ b/packages/api/src/client/types/chat/bsky/convo/sendMessageBatch.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ChatBskyConvoDefs from './defs' @@ -14,12 +14,10 @@ export interface QueryParams {} export interface InputSchema { items: BatchItem[] - [k: string]: unknown } export interface OutputSchema { items: ChatBskyConvoDefs.MessageView[] - [k: string]: unknown } export interface CallOptions { @@ -40,9 +38,9 @@ export function toKnownErr(e: any) { } export interface BatchItem { + $type?: 'chat.bsky.convo.sendMessageBatch#batchItem' convoId: string message: ChatBskyConvoDefs.MessageInput - [k: string]: unknown } export function isBatchItem(v: unknown): v is BatchItem & { diff --git a/packages/api/src/client/types/chat/bsky/convo/unmuteConvo.ts b/packages/api/src/client/types/chat/bsky/convo/unmuteConvo.ts index 67d67ad6af7..ba8ccc9b62e 100644 --- a/packages/api/src/client/types/chat/bsky/convo/unmuteConvo.ts +++ b/packages/api/src/client/types/chat/bsky/convo/unmuteConvo.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ChatBskyConvoDefs from './defs' @@ -14,12 +14,10 @@ export interface QueryParams {} export interface InputSchema { convoId: string - [k: string]: unknown } export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/chat/bsky/convo/updateRead.ts b/packages/api/src/client/types/chat/bsky/convo/updateRead.ts index 61d278e2903..897d006d609 100644 --- a/packages/api/src/client/types/chat/bsky/convo/updateRead.ts +++ b/packages/api/src/client/types/chat/bsky/convo/updateRead.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ChatBskyConvoDefs from './defs' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { convoId: string messageId?: string - [k: string]: unknown } export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/chat/bsky/moderation/getActorMetadata.ts b/packages/api/src/client/types/chat/bsky/moderation/getActorMetadata.ts index 2bfa7a199cd..b74568f5e68 100644 --- a/packages/api/src/client/types/chat/bsky/moderation/getActorMetadata.ts +++ b/packages/api/src/client/types/chat/bsky/moderation/getActorMetadata.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'chat.bsky.moderation.getActorMetadata' @@ -19,7 +19,6 @@ export interface OutputSchema { day: Metadata month: Metadata all: Metadata - [k: string]: unknown } export interface CallOptions { @@ -38,11 +37,11 @@ export function toKnownErr(e: any) { } export interface Metadata { + $type?: 'chat.bsky.moderation.getActorMetadata#metadata' messagesSent: number messagesReceived: number convos: number convosStarted: number - [k: string]: unknown } export function isMetadata(v: unknown): v is Metadata & { diff --git a/packages/api/src/client/types/chat/bsky/moderation/getMessageContext.ts b/packages/api/src/client/types/chat/bsky/moderation/getMessageContext.ts index 90e05a712be..15751c4447d 100644 --- a/packages/api/src/client/types/chat/bsky/moderation/getMessageContext.ts +++ b/packages/api/src/client/types/chat/bsky/moderation/getMessageContext.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ChatBskyConvoDefs from '../convo/defs' @@ -26,7 +26,6 @@ export interface OutputSchema { | ChatBskyConvoDefs.DeletedMessageView | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/chat/bsky/moderation/updateActorAccess.ts b/packages/api/src/client/types/chat/bsky/moderation/updateActorAccess.ts index 78b90a0a6a2..8e4bd4117b6 100644 --- a/packages/api/src/client/types/chat/bsky/moderation/updateActorAccess.ts +++ b/packages/api/src/client/types/chat/bsky/moderation/updateActorAccess.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'chat.bsky.moderation.updateActorAccess' @@ -15,7 +15,6 @@ export interface InputSchema { actor: string allowAccess: boolean ref?: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/defs.ts b/packages/api/src/client/types/com/atproto/admin/defs.ts index c0a8f8de23d..0971bbb1d50 100644 --- a/packages/api/src/client/types/com/atproto/admin/defs.ts +++ b/packages/api/src/client/types/com/atproto/admin/defs.ts @@ -3,16 +3,16 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoServerDefs from '../server/defs' export const id = 'com.atproto.admin.defs' export interface StatusAttr { + $type?: 'com.atproto.admin.defs#statusAttr' applied: boolean ref?: string - [k: string]: unknown } export function isStatusAttr( @@ -29,10 +29,11 @@ export function validateStatusAttr(v: unknown) { } export interface AccountView { + $type?: 'com.atproto.admin.defs#accountView' did: string handle: string email?: string - relatedRecords?: {}[] + relatedRecords?: { [_ in string]: unknown }[] indexedAt: string invitedBy?: ComAtprotoServerDefs.InviteCode invites?: ComAtprotoServerDefs.InviteCode[] @@ -41,7 +42,6 @@ export interface AccountView { inviteNote?: string deactivatedAt?: string threatSignatures?: ThreatSignature[] - [k: string]: unknown } export function isAccountView(v: unknown): v is AccountView & { @@ -58,8 +58,8 @@ export function validateAccountView(v: unknown) { } export interface RepoRef { + $type?: 'com.atproto.admin.defs#repoRef' did: string - [k: string]: unknown } export function isRepoRef( @@ -73,10 +73,10 @@ export function validateRepoRef(v: unknown) { } export interface RepoBlobRef { + $type?: 'com.atproto.admin.defs#repoBlobRef' did: string cid: string recordUri?: string - [k: string]: unknown } export function isRepoBlobRef(v: unknown): v is RepoBlobRef & { @@ -93,9 +93,9 @@ export function validateRepoBlobRef(v: unknown) { } export interface ThreatSignature { + $type?: 'com.atproto.admin.defs#threatSignature' property: string value: string - [k: string]: unknown } export function isThreatSignature(v: unknown): v is ThreatSignature & { diff --git a/packages/api/src/client/types/com/atproto/admin/deleteAccount.ts b/packages/api/src/client/types/com/atproto/admin/deleteAccount.ts index 8b61c584a1d..59699fd284b 100644 --- a/packages/api/src/client/types/com/atproto/admin/deleteAccount.ts +++ b/packages/api/src/client/types/com/atproto/admin/deleteAccount.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.admin.deleteAccount' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { did: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/disableAccountInvites.ts b/packages/api/src/client/types/com/atproto/admin/disableAccountInvites.ts index ce4895cc809..5747aee7e6e 100644 --- a/packages/api/src/client/types/com/atproto/admin/disableAccountInvites.ts +++ b/packages/api/src/client/types/com/atproto/admin/disableAccountInvites.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.admin.disableAccountInvites' @@ -15,7 +15,6 @@ export interface InputSchema { account: string /** Optional reason for disabled invites. */ note?: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/disableInviteCodes.ts b/packages/api/src/client/types/com/atproto/admin/disableInviteCodes.ts index f7b7a14aad9..526ebadf0da 100644 --- a/packages/api/src/client/types/com/atproto/admin/disableInviteCodes.ts +++ b/packages/api/src/client/types/com/atproto/admin/disableInviteCodes.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.admin.disableInviteCodes' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { codes?: string[] accounts?: string[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/enableAccountInvites.ts b/packages/api/src/client/types/com/atproto/admin/enableAccountInvites.ts index 227d599345c..9ae5c227a4a 100644 --- a/packages/api/src/client/types/com/atproto/admin/enableAccountInvites.ts +++ b/packages/api/src/client/types/com/atproto/admin/enableAccountInvites.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.admin.enableAccountInvites' @@ -15,7 +15,6 @@ export interface InputSchema { account: string /** Optional reason for enabled invites. */ note?: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/getAccountInfo.ts b/packages/api/src/client/types/com/atproto/admin/getAccountInfo.ts index be2fa407624..a1aa9f7fa73 100644 --- a/packages/api/src/client/types/com/atproto/admin/getAccountInfo.ts +++ b/packages/api/src/client/types/com/atproto/admin/getAccountInfo.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoAdminDefs from './defs' diff --git a/packages/api/src/client/types/com/atproto/admin/getAccountInfos.ts b/packages/api/src/client/types/com/atproto/admin/getAccountInfos.ts index 1ec19395e0c..16d45554355 100644 --- a/packages/api/src/client/types/com/atproto/admin/getAccountInfos.ts +++ b/packages/api/src/client/types/com/atproto/admin/getAccountInfos.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoAdminDefs from './defs' @@ -18,7 +18,6 @@ export type InputSchema = undefined export interface OutputSchema { infos: ComAtprotoAdminDefs.AccountView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/getInviteCodes.ts b/packages/api/src/client/types/com/atproto/admin/getInviteCodes.ts index 1f189e51851..d37c249806c 100644 --- a/packages/api/src/client/types/com/atproto/admin/getInviteCodes.ts +++ b/packages/api/src/client/types/com/atproto/admin/getInviteCodes.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoServerDefs from '../server/defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string codes: ComAtprotoServerDefs.InviteCode[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/getSubjectStatus.ts b/packages/api/src/client/types/com/atproto/admin/getSubjectStatus.ts index 37bc36bb1b9..947e0f06fe0 100644 --- a/packages/api/src/client/types/com/atproto/admin/getSubjectStatus.ts +++ b/packages/api/src/client/types/com/atproto/admin/getSubjectStatus.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoAdminDefs from './defs' import * as ComAtprotoRepoStrongRef from '../repo/strongRef' @@ -27,7 +27,6 @@ export interface OutputSchema { | { $type: string; [k: string]: unknown } takedown?: ComAtprotoAdminDefs.StatusAttr deactivated?: ComAtprotoAdminDefs.StatusAttr - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/searchAccounts.ts b/packages/api/src/client/types/com/atproto/admin/searchAccounts.ts index be52b577255..9855d0ddbab 100644 --- a/packages/api/src/client/types/com/atproto/admin/searchAccounts.ts +++ b/packages/api/src/client/types/com/atproto/admin/searchAccounts.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoAdminDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string accounts: ComAtprotoAdminDefs.AccountView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/sendEmail.ts b/packages/api/src/client/types/com/atproto/admin/sendEmail.ts index 23e45543e21..8cd666d08fe 100644 --- a/packages/api/src/client/types/com/atproto/admin/sendEmail.ts +++ b/packages/api/src/client/types/com/atproto/admin/sendEmail.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.admin.sendEmail' @@ -18,12 +18,10 @@ export interface InputSchema { 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 - [k: string]: unknown } export interface OutputSchema { sent: boolean - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/updateAccountEmail.ts b/packages/api/src/client/types/com/atproto/admin/updateAccountEmail.ts index ef11ea517b5..2139c8dd495 100644 --- a/packages/api/src/client/types/com/atproto/admin/updateAccountEmail.ts +++ b/packages/api/src/client/types/com/atproto/admin/updateAccountEmail.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.admin.updateAccountEmail' @@ -15,7 +15,6 @@ export interface InputSchema { /** The handle or DID of the repo. */ account: string email: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/updateAccountHandle.ts b/packages/api/src/client/types/com/atproto/admin/updateAccountHandle.ts index 60ff1fc7d35..4757cd8eccb 100644 --- a/packages/api/src/client/types/com/atproto/admin/updateAccountHandle.ts +++ b/packages/api/src/client/types/com/atproto/admin/updateAccountHandle.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.admin.updateAccountHandle' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { did: string handle: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/updateAccountPassword.ts b/packages/api/src/client/types/com/atproto/admin/updateAccountPassword.ts index 20ba6c538df..3648266a69d 100644 --- a/packages/api/src/client/types/com/atproto/admin/updateAccountPassword.ts +++ b/packages/api/src/client/types/com/atproto/admin/updateAccountPassword.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.admin.updateAccountPassword' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { did: string password: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/admin/updateSubjectStatus.ts b/packages/api/src/client/types/com/atproto/admin/updateSubjectStatus.ts index 02b6d56c980..d956d5fb360 100644 --- a/packages/api/src/client/types/com/atproto/admin/updateSubjectStatus.ts +++ b/packages/api/src/client/types/com/atproto/admin/updateSubjectStatus.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoAdminDefs from './defs' import * as ComAtprotoRepoStrongRef from '../repo/strongRef' @@ -21,7 +21,6 @@ export interface InputSchema { | { $type: string; [k: string]: unknown } takedown?: ComAtprotoAdminDefs.StatusAttr deactivated?: ComAtprotoAdminDefs.StatusAttr - [k: string]: unknown } export interface OutputSchema { @@ -31,7 +30,6 @@ export interface OutputSchema { | ComAtprotoAdminDefs.RepoBlobRef | { $type: string; [k: string]: unknown } takedown?: ComAtprotoAdminDefs.StatusAttr - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/identity/getRecommendedDidCredentials.ts b/packages/api/src/client/types/com/atproto/identity/getRecommendedDidCredentials.ts index fb2f9666fd7..f391ce33f35 100644 --- a/packages/api/src/client/types/com/atproto/identity/getRecommendedDidCredentials.ts +++ b/packages/api/src/client/types/com/atproto/identity/getRecommendedDidCredentials.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.identity.getRecommendedDidCredentials' @@ -17,9 +17,8 @@ export interface OutputSchema { /** Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs. */ rotationKeys?: string[] alsoKnownAs?: string[] - verificationMethods?: {} - services?: {} - [k: string]: unknown + verificationMethods?: { [_ in string]: unknown } + services?: { [_ in string]: unknown } } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/identity/requestPlcOperationSignature.ts b/packages/api/src/client/types/com/atproto/identity/requestPlcOperationSignature.ts index 8ee81a5c88b..7d785c2b788 100644 --- a/packages/api/src/client/types/com/atproto/identity/requestPlcOperationSignature.ts +++ b/packages/api/src/client/types/com/atproto/identity/requestPlcOperationSignature.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.identity.requestPlcOperationSignature' diff --git a/packages/api/src/client/types/com/atproto/identity/resolveHandle.ts b/packages/api/src/client/types/com/atproto/identity/resolveHandle.ts index 103c50f712c..cce77b99b47 100644 --- a/packages/api/src/client/types/com/atproto/identity/resolveHandle.ts +++ b/packages/api/src/client/types/com/atproto/identity/resolveHandle.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.identity.resolveHandle' @@ -18,7 +18,6 @@ export type InputSchema = undefined export interface OutputSchema { did: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/identity/signPlcOperation.ts b/packages/api/src/client/types/com/atproto/identity/signPlcOperation.ts index 713a13dd96e..18a8404f8b8 100644 --- a/packages/api/src/client/types/com/atproto/identity/signPlcOperation.ts +++ b/packages/api/src/client/types/com/atproto/identity/signPlcOperation.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.identity.signPlcOperation' @@ -16,15 +16,13 @@ export interface InputSchema { token?: string rotationKeys?: string[] alsoKnownAs?: string[] - verificationMethods?: {} - services?: {} - [k: string]: unknown + verificationMethods?: { [_ in string]: unknown } + services?: { [_ in string]: unknown } } export interface OutputSchema { /** A signed DID PLC operation. */ - operation: {} - [k: string]: unknown + operation: { [_ in string]: unknown } } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/identity/submitPlcOperation.ts b/packages/api/src/client/types/com/atproto/identity/submitPlcOperation.ts index ce27215afe7..7f7bd2f6083 100644 --- a/packages/api/src/client/types/com/atproto/identity/submitPlcOperation.ts +++ b/packages/api/src/client/types/com/atproto/identity/submitPlcOperation.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.identity.submitPlcOperation' @@ -12,8 +12,7 @@ export const id = 'com.atproto.identity.submitPlcOperation' export interface QueryParams {} export interface InputSchema { - operation: {} - [k: string]: unknown + operation: { [_ in string]: unknown } } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/identity/updateHandle.ts b/packages/api/src/client/types/com/atproto/identity/updateHandle.ts index 57aa5b52e8a..2336c15d627 100644 --- a/packages/api/src/client/types/com/atproto/identity/updateHandle.ts +++ b/packages/api/src/client/types/com/atproto/identity/updateHandle.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.identity.updateHandle' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { /** The new handle. */ handle: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/label/defs.ts b/packages/api/src/client/types/com/atproto/label/defs.ts index 1668bb4bba5..caddcc90f19 100644 --- a/packages/api/src/client/types/com/atproto/label/defs.ts +++ b/packages/api/src/client/types/com/atproto/label/defs.ts @@ -3,13 +3,14 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export 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. */ @@ -28,7 +29,6 @@ export interface Label { exp?: string /** Signature of dag-cbor encoded label. */ sig?: Uint8Array - [k: string]: unknown } export function isLabel( @@ -43,8 +43,8 @@ export function validateLabel(v: unknown) { /** Metadata tags on an atproto record, published by the author within the record. */ export interface SelfLabels { + $type?: 'com.atproto.label.defs#selfLabels' values: SelfLabel[] - [k: string]: unknown } export function isSelfLabels( @@ -62,9 +62,9 @@ export function validateSelfLabels(v: unknown) { /** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. */ export interface SelfLabel { + $type?: 'com.atproto.label.defs#selfLabel' /** The short string name of the value or type of this label. */ val: string - [k: string]: unknown } export function isSelfLabel( @@ -79,6 +79,7 @@ export function validateSelfLabel(v: unknown) { /** Declares a label value and its expected interpretations and behaviors. */ export interface LabelValueDefinition { + $type?: 'com.atproto.label.defs#labelValueDefinition' /** The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). */ identifier: string /** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. */ @@ -90,7 +91,6 @@ export interface LabelValueDefinition { /** Does the user need to have adult content enabled in order to configure this label? */ adultOnly?: boolean locales: LabelValueDefinitionStrings[] - [k: string]: unknown } export function isLabelValueDefinition( @@ -110,13 +110,13 @@ export function validateLabelValueDefinition(v: unknown) { /** Strings which describe the label in the UI, localized into a specific language. */ export interface LabelValueDefinitionStrings { + $type?: 'com.atproto.label.defs#labelValueDefinitionStrings' /** The code of the language these strings are written in. */ lang: string /** A short human-readable name for the label. */ name: string /** A longer description of what the label means and why it might be applied. */ description: string - [k: string]: unknown } export function isLabelValueDefinitionStrings( diff --git a/packages/api/src/client/types/com/atproto/label/queryLabels.ts b/packages/api/src/client/types/com/atproto/label/queryLabels.ts index 99b9dc6032e..4949f468adf 100644 --- a/packages/api/src/client/types/com/atproto/label/queryLabels.ts +++ b/packages/api/src/client/types/com/atproto/label/queryLabels.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoLabelDefs from './defs' @@ -24,7 +24,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string labels: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/label/subscribeLabels.ts b/packages/api/src/client/types/com/atproto/label/subscribeLabels.ts index 69e4a369f71..1c2c3b9df3e 100644 --- a/packages/api/src/client/types/com/atproto/label/subscribeLabels.ts +++ b/packages/api/src/client/types/com/atproto/label/subscribeLabels.ts @@ -4,16 +4,16 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoLabelDefs from './defs' export const id = 'com.atproto.label.subscribeLabels' export interface Labels { + $type?: 'com.atproto.label.subscribeLabels#labels' seq: number labels: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isLabels(v: unknown): v is Labels & { @@ -27,9 +27,9 @@ export function validateLabels(v: unknown) { } export interface Info { + $type?: 'com.atproto.label.subscribeLabels#info' name: 'OutdatedCursor' | (string & {}) message?: string - [k: string]: unknown } export function isInfo( diff --git a/packages/api/src/client/types/com/atproto/moderation/createReport.ts b/packages/api/src/client/types/com/atproto/moderation/createReport.ts index 969effafdb3..8e0c237abae 100644 --- a/packages/api/src/client/types/com/atproto/moderation/createReport.ts +++ b/packages/api/src/client/types/com/atproto/moderation/createReport.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoModerationDefs from './defs' import * as ComAtprotoAdminDefs from '../admin/defs' @@ -22,7 +22,6 @@ export interface InputSchema { | ComAtprotoAdminDefs.RepoRef | ComAtprotoRepoStrongRef.Main | { $type: string; [k: string]: unknown } - [k: string]: unknown } export interface OutputSchema { @@ -35,7 +34,6 @@ export interface OutputSchema { | { $type: string; [k: string]: unknown } reportedBy: string createdAt: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/moderation/defs.ts b/packages/api/src/client/types/com/atproto/moderation/defs.ts index c09fd3051f2..a58870425cd 100644 --- a/packages/api/src/client/types/com/atproto/moderation/defs.ts +++ b/packages/api/src/client/types/com/atproto/moderation/defs.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.moderation.defs' diff --git a/packages/api/src/client/types/com/atproto/repo/applyWrites.ts b/packages/api/src/client/types/com/atproto/repo/applyWrites.ts index e127516d54d..8e19af7ceee 100644 --- a/packages/api/src/client/types/com/atproto/repo/applyWrites.ts +++ b/packages/api/src/client/types/com/atproto/repo/applyWrites.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoRepoDefs from './defs' @@ -20,13 +20,11 @@ export interface InputSchema { writes: (Create | Update | Delete)[] /** If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { commit?: ComAtprotoRepoDefs.CommitMeta results?: (CreateResult | UpdateResult | DeleteResult)[] - [k: string]: unknown } export interface CallOptions { @@ -58,10 +56,10 @@ export function toKnownErr(e: any) { /** Operation which creates a new record. */ export interface Create { + $type?: 'com.atproto.repo.applyWrites#create' collection: string rkey?: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export function isCreate( @@ -76,10 +74,10 @@ export function validateCreate(v: unknown) { /** Operation which updates an existing record. */ export interface Update { + $type?: 'com.atproto.repo.applyWrites#update' collection: string rkey: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export function isUpdate( @@ -94,9 +92,9 @@ export function validateUpdate(v: unknown) { /** Operation which deletes an existing record. */ export interface Delete { + $type?: 'com.atproto.repo.applyWrites#delete' collection: string rkey: string - [k: string]: unknown } export function isDelete( @@ -110,10 +108,10 @@ export function validateDelete(v: unknown) { } export interface CreateResult { + $type?: 'com.atproto.repo.applyWrites#createResult' uri: string cid: string validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export function isCreateResult(v: unknown): v is CreateResult & { @@ -130,10 +128,10 @@ export function validateCreateResult(v: unknown) { } export interface UpdateResult { + $type?: 'com.atproto.repo.applyWrites#updateResult' uri: string cid: string validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export function isUpdateResult(v: unknown): v is UpdateResult & { @@ -150,7 +148,7 @@ export function validateUpdateResult(v: unknown) { } export interface DeleteResult { - [k: string]: unknown + $type?: 'com.atproto.repo.applyWrites#deleteResult' } export function isDeleteResult(v: unknown): v is DeleteResult & { diff --git a/packages/api/src/client/types/com/atproto/repo/createRecord.ts b/packages/api/src/client/types/com/atproto/repo/createRecord.ts index 58cc5cb3775..2d6faa10773 100644 --- a/packages/api/src/client/types/com/atproto/repo/createRecord.ts +++ b/packages/api/src/client/types/com/atproto/repo/createRecord.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoRepoDefs from './defs' @@ -22,10 +22,9 @@ export interface InputSchema { /** 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. */ validate?: boolean /** The record itself. Must contain a $type field. */ - record: {} + record: { [_ in string]: unknown } /** Compare and swap with the previous commit by CID. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { @@ -33,7 +32,6 @@ export interface OutputSchema { cid: string commit?: ComAtprotoRepoDefs.CommitMeta validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/repo/defs.ts b/packages/api/src/client/types/com/atproto/repo/defs.ts index a11b9387077..ca81f13af01 100644 --- a/packages/api/src/client/types/com/atproto/repo/defs.ts +++ b/packages/api/src/client/types/com/atproto/repo/defs.ts @@ -3,15 +3,15 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.repo.defs' export interface CommitMeta { + $type?: 'com.atproto.repo.defs#commitMeta' cid: string rev: string - [k: string]: unknown } export function isCommitMeta( diff --git a/packages/api/src/client/types/com/atproto/repo/deleteRecord.ts b/packages/api/src/client/types/com/atproto/repo/deleteRecord.ts index 6adfbe347a0..5cb5dff5907 100644 --- a/packages/api/src/client/types/com/atproto/repo/deleteRecord.ts +++ b/packages/api/src/client/types/com/atproto/repo/deleteRecord.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoRepoDefs from './defs' @@ -23,12 +23,10 @@ export interface InputSchema { swapRecord?: string /** Compare and swap with the previous commit by CID. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { commit?: ComAtprotoRepoDefs.CommitMeta - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/repo/describeRepo.ts b/packages/api/src/client/types/com/atproto/repo/describeRepo.ts index b57d5b3e42d..7baba31a228 100644 --- a/packages/api/src/client/types/com/atproto/repo/describeRepo.ts +++ b/packages/api/src/client/types/com/atproto/repo/describeRepo.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.repo.describeRepo' @@ -20,12 +20,11 @@ export interface OutputSchema { handle: string did: string /** The complete DID document for this account. */ - didDoc: {} + didDoc: { [_ in string]: unknown } /** List of all the collections (NSIDs) for which this repo contains at least one record. */ collections: string[] /** Indicates if handle is currently valid (resolves bi-directionally) */ handleIsCorrect: boolean - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/repo/getRecord.ts b/packages/api/src/client/types/com/atproto/repo/getRecord.ts index 396ca85250f..c181e84b6f6 100644 --- a/packages/api/src/client/types/com/atproto/repo/getRecord.ts +++ b/packages/api/src/client/types/com/atproto/repo/getRecord.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.repo.getRecord' @@ -25,8 +25,7 @@ export type InputSchema = undefined export interface OutputSchema { uri: string cid?: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/repo/importRepo.ts b/packages/api/src/client/types/com/atproto/repo/importRepo.ts index 37c13cf5b57..bed507c8650 100644 --- a/packages/api/src/client/types/com/atproto/repo/importRepo.ts +++ b/packages/api/src/client/types/com/atproto/repo/importRepo.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.repo.importRepo' diff --git a/packages/api/src/client/types/com/atproto/repo/listMissingBlobs.ts b/packages/api/src/client/types/com/atproto/repo/listMissingBlobs.ts index 29724ffcca6..2c92586466e 100644 --- a/packages/api/src/client/types/com/atproto/repo/listMissingBlobs.ts +++ b/packages/api/src/client/types/com/atproto/repo/listMissingBlobs.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.repo.listMissingBlobs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string blobs: RecordBlob[] - [k: string]: unknown } export interface CallOptions { @@ -38,9 +37,9 @@ export function toKnownErr(e: any) { } export interface RecordBlob { + $type?: 'com.atproto.repo.listMissingBlobs#recordBlob' cid: string recordUri: string - [k: string]: unknown } export function isRecordBlob(v: unknown): v is RecordBlob & { diff --git a/packages/api/src/client/types/com/atproto/repo/listRecords.ts b/packages/api/src/client/types/com/atproto/repo/listRecords.ts index 4ddf769708e..0391432e29a 100644 --- a/packages/api/src/client/types/com/atproto/repo/listRecords.ts +++ b/packages/api/src/client/types/com/atproto/repo/listRecords.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.repo.listRecords' @@ -30,7 +30,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string records: Record[] - [k: string]: unknown } export interface CallOptions { @@ -49,10 +48,10 @@ export function toKnownErr(e: any) { } export interface Record { + $type?: 'com.atproto.repo.listRecords#record' uri: string cid: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export function isRecord( diff --git a/packages/api/src/client/types/com/atproto/repo/putRecord.ts b/packages/api/src/client/types/com/atproto/repo/putRecord.ts index eed5ee770c1..8ab277506ef 100644 --- a/packages/api/src/client/types/com/atproto/repo/putRecord.ts +++ b/packages/api/src/client/types/com/atproto/repo/putRecord.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoRepoDefs from './defs' @@ -22,12 +22,11 @@ export interface InputSchema { /** 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. */ validate?: boolean /** The record to write. */ - record: {} + record: { [_ in string]: unknown } /** Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation */ swapRecord?: string | null /** Compare and swap with the previous commit by CID. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { @@ -35,7 +34,6 @@ export interface OutputSchema { cid: string commit?: ComAtprotoRepoDefs.CommitMeta validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/repo/strongRef.ts b/packages/api/src/client/types/com/atproto/repo/strongRef.ts index c2f87a11400..b424a3c51e1 100644 --- a/packages/api/src/client/types/com/atproto/repo/strongRef.ts +++ b/packages/api/src/client/types/com/atproto/repo/strongRef.ts @@ -3,15 +3,15 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.repo.strongRef' export interface Main { + $type?: 'com.atproto.repo.strongRef' | 'com.atproto.repo.strongRef#main' uri: string cid: string - [k: string]: unknown } export function isMain( diff --git a/packages/api/src/client/types/com/atproto/repo/uploadBlob.ts b/packages/api/src/client/types/com/atproto/repo/uploadBlob.ts index 0fac5f55961..f3b2e34663c 100644 --- a/packages/api/src/client/types/com/atproto/repo/uploadBlob.ts +++ b/packages/api/src/client/types/com/atproto/repo/uploadBlob.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.repo.uploadBlob' @@ -15,7 +15,6 @@ export type InputSchema = string | Uint8Array | Blob export interface OutputSchema { blob: BlobRef - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/activateAccount.ts b/packages/api/src/client/types/com/atproto/server/activateAccount.ts index af5e1108ef6..6e19dbb9a6b 100644 --- a/packages/api/src/client/types/com/atproto/server/activateAccount.ts +++ b/packages/api/src/client/types/com/atproto/server/activateAccount.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.activateAccount' diff --git a/packages/api/src/client/types/com/atproto/server/checkAccountStatus.ts b/packages/api/src/client/types/com/atproto/server/checkAccountStatus.ts index ef567d17ce7..338e2b64cbc 100644 --- a/packages/api/src/client/types/com/atproto/server/checkAccountStatus.ts +++ b/packages/api/src/client/types/com/atproto/server/checkAccountStatus.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.checkAccountStatus' @@ -23,7 +23,6 @@ export interface OutputSchema { privateStateValues: number expectedBlobs: number importedBlobs: number - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/confirmEmail.ts b/packages/api/src/client/types/com/atproto/server/confirmEmail.ts index 076d28ed7c2..5ea8513e593 100644 --- a/packages/api/src/client/types/com/atproto/server/confirmEmail.ts +++ b/packages/api/src/client/types/com/atproto/server/confirmEmail.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.confirmEmail' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { email: string token: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/createAccount.ts b/packages/api/src/client/types/com/atproto/server/createAccount.ts index 053a2390d47..3708a33f581 100644 --- a/packages/api/src/client/types/com/atproto/server/createAccount.ts +++ b/packages/api/src/client/types/com/atproto/server/createAccount.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.createAccount' @@ -25,8 +25,7 @@ export interface InputSchema { /** DID PLC rotation key (aka, recovery key) to be included in PLC creation operation. */ recoveryKey?: string /** 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. */ - plcOp?: {} - [k: string]: unknown + plcOp?: { [_ in string]: unknown } } /** Account login session returned on successful account creation. */ @@ -37,8 +36,7 @@ export interface OutputSchema { /** The DID of the new account. */ did: string /** Complete DID document. */ - didDoc?: {} - [k: string]: unknown + didDoc?: { [_ in string]: unknown } } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/createAppPassword.ts b/packages/api/src/client/types/com/atproto/server/createAppPassword.ts index bb8443e866a..8e3f5e5a875 100644 --- a/packages/api/src/client/types/com/atproto/server/createAppPassword.ts +++ b/packages/api/src/client/types/com/atproto/server/createAppPassword.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.createAppPassword' @@ -16,7 +16,6 @@ export interface InputSchema { name: string /** If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients. */ privileged?: boolean - [k: string]: unknown } export type OutputSchema = AppPassword @@ -49,11 +48,11 @@ export function toKnownErr(e: any) { } export interface AppPassword { + $type?: 'com.atproto.server.createAppPassword#appPassword' name: string password: string createdAt: string privileged?: boolean - [k: string]: unknown } export function isAppPassword(v: unknown): v is AppPassword & { diff --git a/packages/api/src/client/types/com/atproto/server/createInviteCode.ts b/packages/api/src/client/types/com/atproto/server/createInviteCode.ts index 36823bed86a..3f74bceb633 100644 --- a/packages/api/src/client/types/com/atproto/server/createInviteCode.ts +++ b/packages/api/src/client/types/com/atproto/server/createInviteCode.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.createInviteCode' @@ -14,12 +14,10 @@ export interface QueryParams {} export interface InputSchema { useCount: number forAccount?: string - [k: string]: unknown } export interface OutputSchema { code: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/createInviteCodes.ts b/packages/api/src/client/types/com/atproto/server/createInviteCodes.ts index 35832d8ce97..29fa49549ed 100644 --- a/packages/api/src/client/types/com/atproto/server/createInviteCodes.ts +++ b/packages/api/src/client/types/com/atproto/server/createInviteCodes.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.createInviteCodes' @@ -15,12 +15,10 @@ export interface InputSchema { codeCount: number useCount: number forAccounts?: string[] - [k: string]: unknown } export interface OutputSchema { codes: AccountCodes[] - [k: string]: unknown } export interface CallOptions { @@ -41,9 +39,9 @@ export function toKnownErr(e: any) { } export interface AccountCodes { + $type?: 'com.atproto.server.createInviteCodes#accountCodes' account: string codes: string[] - [k: string]: unknown } export function isAccountCodes(v: unknown): v is AccountCodes & { diff --git a/packages/api/src/client/types/com/atproto/server/createSession.ts b/packages/api/src/client/types/com/atproto/server/createSession.ts index 7d7fae0acb1..6e71a732e92 100644 --- a/packages/api/src/client/types/com/atproto/server/createSession.ts +++ b/packages/api/src/client/types/com/atproto/server/createSession.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.createSession' @@ -16,7 +16,6 @@ export interface InputSchema { identifier: string password: string authFactorToken?: string - [k: string]: unknown } export interface OutputSchema { @@ -24,14 +23,13 @@ export interface OutputSchema { refreshJwt: string handle: string did: string - didDoc?: {} + didDoc?: { [_ in string]: unknown } email?: string emailConfirmed?: boolean emailAuthFactor?: boolean active?: boolean /** 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. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/deactivateAccount.ts b/packages/api/src/client/types/com/atproto/server/deactivateAccount.ts index 16baa02537d..51a985aee94 100644 --- a/packages/api/src/client/types/com/atproto/server/deactivateAccount.ts +++ b/packages/api/src/client/types/com/atproto/server/deactivateAccount.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.deactivateAccount' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { /** A recommendation to server as to how long they should hold onto the deactivated account before deleting. */ deleteAfter?: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/defs.ts b/packages/api/src/client/types/com/atproto/server/defs.ts index c6b497947b9..b591425cfd0 100644 --- a/packages/api/src/client/types/com/atproto/server/defs.ts +++ b/packages/api/src/client/types/com/atproto/server/defs.ts @@ -3,12 +3,13 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.defs' export interface InviteCode { + $type?: 'com.atproto.server.defs#inviteCode' code: string available: number disabled: boolean @@ -16,7 +17,6 @@ export interface InviteCode { createdBy: string createdAt: string uses: InviteCodeUse[] - [k: string]: unknown } export function isInviteCode( @@ -33,9 +33,9 @@ export function validateInviteCode(v: unknown) { } export interface InviteCodeUse { + $type?: 'com.atproto.server.defs#inviteCodeUse' usedBy: string usedAt: string - [k: string]: unknown } export function isInviteCodeUse(v: unknown): v is InviteCodeUse & { diff --git a/packages/api/src/client/types/com/atproto/server/deleteAccount.ts b/packages/api/src/client/types/com/atproto/server/deleteAccount.ts index 2c2af1f05d9..1639e917941 100644 --- a/packages/api/src/client/types/com/atproto/server/deleteAccount.ts +++ b/packages/api/src/client/types/com/atproto/server/deleteAccount.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.deleteAccount' @@ -15,7 +15,6 @@ export interface InputSchema { did: string password: string token: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/deleteSession.ts b/packages/api/src/client/types/com/atproto/server/deleteSession.ts index d70b45b42e5..4c85746245b 100644 --- a/packages/api/src/client/types/com/atproto/server/deleteSession.ts +++ b/packages/api/src/client/types/com/atproto/server/deleteSession.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.deleteSession' diff --git a/packages/api/src/client/types/com/atproto/server/describeServer.ts b/packages/api/src/client/types/com/atproto/server/describeServer.ts index 75bddefc462..391e1ce80eb 100644 --- a/packages/api/src/client/types/com/atproto/server/describeServer.ts +++ b/packages/api/src/client/types/com/atproto/server/describeServer.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.describeServer' @@ -23,7 +23,6 @@ export interface OutputSchema { links?: Links contact?: Contact did: string - [k: string]: unknown } export interface CallOptions { @@ -42,9 +41,9 @@ export function toKnownErr(e: any) { } export interface Links { + $type?: 'com.atproto.server.describeServer#links' privacyPolicy?: string termsOfService?: string - [k: string]: unknown } export function isLinks( @@ -58,8 +57,8 @@ export function validateLinks(v: unknown) { } export interface Contact { + $type?: 'com.atproto.server.describeServer#contact' email?: string - [k: string]: unknown } export function isContact(v: unknown): v is Contact & { diff --git a/packages/api/src/client/types/com/atproto/server/getAccountInviteCodes.ts b/packages/api/src/client/types/com/atproto/server/getAccountInviteCodes.ts index b589bc978c1..e824fc1532d 100644 --- a/packages/api/src/client/types/com/atproto/server/getAccountInviteCodes.ts +++ b/packages/api/src/client/types/com/atproto/server/getAccountInviteCodes.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoServerDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { codes: ComAtprotoServerDefs.InviteCode[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/getServiceAuth.ts b/packages/api/src/client/types/com/atproto/server/getServiceAuth.ts index 28fca543baf..b547e4f2f04 100644 --- a/packages/api/src/client/types/com/atproto/server/getServiceAuth.ts +++ b/packages/api/src/client/types/com/atproto/server/getServiceAuth.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.getServiceAuth' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { token: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/getSession.ts b/packages/api/src/client/types/com/atproto/server/getSession.ts index feb48585d8a..96ebde39ce5 100644 --- a/packages/api/src/client/types/com/atproto/server/getSession.ts +++ b/packages/api/src/client/types/com/atproto/server/getSession.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.getSession' @@ -19,11 +19,10 @@ export interface OutputSchema { email?: string emailConfirmed?: boolean emailAuthFactor?: boolean - didDoc?: {} + didDoc?: { [_ in string]: unknown } active?: boolean /** 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. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/listAppPasswords.ts b/packages/api/src/client/types/com/atproto/server/listAppPasswords.ts index fa0ae240dbe..c8a68e08333 100644 --- a/packages/api/src/client/types/com/atproto/server/listAppPasswords.ts +++ b/packages/api/src/client/types/com/atproto/server/listAppPasswords.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.listAppPasswords' @@ -15,7 +15,6 @@ export type InputSchema = undefined export interface OutputSchema { passwords: AppPassword[] - [k: string]: unknown } export interface CallOptions { @@ -44,10 +43,10 @@ export function toKnownErr(e: any) { } export interface AppPassword { + $type?: 'com.atproto.server.listAppPasswords#appPassword' name: string createdAt: string privileged?: boolean - [k: string]: unknown } export function isAppPassword(v: unknown): v is AppPassword & { diff --git a/packages/api/src/client/types/com/atproto/server/refreshSession.ts b/packages/api/src/client/types/com/atproto/server/refreshSession.ts index 35e663e5171..adcc7ea878f 100644 --- a/packages/api/src/client/types/com/atproto/server/refreshSession.ts +++ b/packages/api/src/client/types/com/atproto/server/refreshSession.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.refreshSession' @@ -18,11 +18,10 @@ export interface OutputSchema { refreshJwt: string handle: string did: string - didDoc?: {} + didDoc?: { [_ in string]: unknown } active?: boolean /** Hosting status of the account. If not specified, then assume 'active'. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/requestAccountDelete.ts b/packages/api/src/client/types/com/atproto/server/requestAccountDelete.ts index 7057adf778e..d570c732fe5 100644 --- a/packages/api/src/client/types/com/atproto/server/requestAccountDelete.ts +++ b/packages/api/src/client/types/com/atproto/server/requestAccountDelete.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.requestAccountDelete' diff --git a/packages/api/src/client/types/com/atproto/server/requestEmailConfirmation.ts b/packages/api/src/client/types/com/atproto/server/requestEmailConfirmation.ts index 8faf459c053..d91b31094f3 100644 --- a/packages/api/src/client/types/com/atproto/server/requestEmailConfirmation.ts +++ b/packages/api/src/client/types/com/atproto/server/requestEmailConfirmation.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.requestEmailConfirmation' diff --git a/packages/api/src/client/types/com/atproto/server/requestEmailUpdate.ts b/packages/api/src/client/types/com/atproto/server/requestEmailUpdate.ts index 1b01fb95f20..9f7aa201b63 100644 --- a/packages/api/src/client/types/com/atproto/server/requestEmailUpdate.ts +++ b/packages/api/src/client/types/com/atproto/server/requestEmailUpdate.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.requestEmailUpdate' @@ -15,7 +15,6 @@ export type InputSchema = undefined export interface OutputSchema { tokenRequired: boolean - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/requestPasswordReset.ts b/packages/api/src/client/types/com/atproto/server/requestPasswordReset.ts index fb307f517cf..10bfc61c045 100644 --- a/packages/api/src/client/types/com/atproto/server/requestPasswordReset.ts +++ b/packages/api/src/client/types/com/atproto/server/requestPasswordReset.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.requestPasswordReset' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { email: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/reserveSigningKey.ts b/packages/api/src/client/types/com/atproto/server/reserveSigningKey.ts index 76493f8bc9e..9c0cb954949 100644 --- a/packages/api/src/client/types/com/atproto/server/reserveSigningKey.ts +++ b/packages/api/src/client/types/com/atproto/server/reserveSigningKey.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.reserveSigningKey' @@ -14,13 +14,11 @@ export interface QueryParams {} export interface InputSchema { /** The DID to reserve a key for. */ did?: string - [k: string]: unknown } export interface OutputSchema { /** The public key for the reserved signing key, in did:key serialization. */ signingKey: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/resetPassword.ts b/packages/api/src/client/types/com/atproto/server/resetPassword.ts index 87dded705b3..db2cf8e4bbf 100644 --- a/packages/api/src/client/types/com/atproto/server/resetPassword.ts +++ b/packages/api/src/client/types/com/atproto/server/resetPassword.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.resetPassword' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { token: string password: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/revokeAppPassword.ts b/packages/api/src/client/types/com/atproto/server/revokeAppPassword.ts index b5ce55dbfa1..7fd54759f82 100644 --- a/packages/api/src/client/types/com/atproto/server/revokeAppPassword.ts +++ b/packages/api/src/client/types/com/atproto/server/revokeAppPassword.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.revokeAppPassword' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { name: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/server/updateEmail.ts b/packages/api/src/client/types/com/atproto/server/updateEmail.ts index a47151165e0..6c43f0549a3 100644 --- a/packages/api/src/client/types/com/atproto/server/updateEmail.ts +++ b/packages/api/src/client/types/com/atproto/server/updateEmail.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.server.updateEmail' @@ -16,7 +16,6 @@ export interface InputSchema { emailAuthFactor?: boolean /** Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed. */ token?: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/sync/getBlob.ts b/packages/api/src/client/types/com/atproto/sync/getBlob.ts index af4edc32ed7..08e9b888748 100644 --- a/packages/api/src/client/types/com/atproto/sync/getBlob.ts +++ b/packages/api/src/client/types/com/atproto/sync/getBlob.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.getBlob' diff --git a/packages/api/src/client/types/com/atproto/sync/getBlocks.ts b/packages/api/src/client/types/com/atproto/sync/getBlocks.ts index 10c437b1da9..e00030cef38 100644 --- a/packages/api/src/client/types/com/atproto/sync/getBlocks.ts +++ b/packages/api/src/client/types/com/atproto/sync/getBlocks.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.getBlocks' diff --git a/packages/api/src/client/types/com/atproto/sync/getCheckout.ts b/packages/api/src/client/types/com/atproto/sync/getCheckout.ts index b534f168535..dc9b7d6a92f 100644 --- a/packages/api/src/client/types/com/atproto/sync/getCheckout.ts +++ b/packages/api/src/client/types/com/atproto/sync/getCheckout.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.getCheckout' diff --git a/packages/api/src/client/types/com/atproto/sync/getHead.ts b/packages/api/src/client/types/com/atproto/sync/getHead.ts index 56902780485..16422156960 100644 --- a/packages/api/src/client/types/com/atproto/sync/getHead.ts +++ b/packages/api/src/client/types/com/atproto/sync/getHead.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.getHead' @@ -18,7 +18,6 @@ export type InputSchema = undefined export interface OutputSchema { root: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/sync/getLatestCommit.ts b/packages/api/src/client/types/com/atproto/sync/getLatestCommit.ts index 2e0d0379750..ccf0caa30c1 100644 --- a/packages/api/src/client/types/com/atproto/sync/getLatestCommit.ts +++ b/packages/api/src/client/types/com/atproto/sync/getLatestCommit.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.getLatestCommit' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { cid: string rev: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/sync/getRecord.ts b/packages/api/src/client/types/com/atproto/sync/getRecord.ts index 453f2f355cd..83ebfca76ec 100644 --- a/packages/api/src/client/types/com/atproto/sync/getRecord.ts +++ b/packages/api/src/client/types/com/atproto/sync/getRecord.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.getRecord' diff --git a/packages/api/src/client/types/com/atproto/sync/getRepo.ts b/packages/api/src/client/types/com/atproto/sync/getRepo.ts index b0f2fb51884..bfba143c593 100644 --- a/packages/api/src/client/types/com/atproto/sync/getRepo.ts +++ b/packages/api/src/client/types/com/atproto/sync/getRepo.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.getRepo' diff --git a/packages/api/src/client/types/com/atproto/sync/getRepoStatus.ts b/packages/api/src/client/types/com/atproto/sync/getRepoStatus.ts index 31170894b51..b9448832396 100644 --- a/packages/api/src/client/types/com/atproto/sync/getRepoStatus.ts +++ b/packages/api/src/client/types/com/atproto/sync/getRepoStatus.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.getRepoStatus' @@ -23,7 +23,6 @@ export interface OutputSchema { status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) /** Optional field, the current rev of the repo, if active=true */ rev?: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/sync/listBlobs.ts b/packages/api/src/client/types/com/atproto/sync/listBlobs.ts index a57f6f6efa8..c5f0b16f5a0 100644 --- a/packages/api/src/client/types/com/atproto/sync/listBlobs.ts +++ b/packages/api/src/client/types/com/atproto/sync/listBlobs.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.listBlobs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string cids: string[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/sync/listRepos.ts b/packages/api/src/client/types/com/atproto/sync/listRepos.ts index 89ce451ba73..fd15a1f422d 100644 --- a/packages/api/src/client/types/com/atproto/sync/listRepos.ts +++ b/packages/api/src/client/types/com/atproto/sync/listRepos.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.listRepos' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string repos: Repo[] - [k: string]: unknown } export interface CallOptions { @@ -38,6 +37,7 @@ export function toKnownErr(e: any) { } export interface Repo { + $type?: 'com.atproto.sync.listRepos#repo' did: string /** Current repo commit CID */ head: string @@ -45,7 +45,6 @@ export interface Repo { active?: boolean /** 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. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export function isRepo( diff --git a/packages/api/src/client/types/com/atproto/sync/notifyOfUpdate.ts b/packages/api/src/client/types/com/atproto/sync/notifyOfUpdate.ts index 88bcf9e99fb..e2b63a9ff02 100644 --- a/packages/api/src/client/types/com/atproto/sync/notifyOfUpdate.ts +++ b/packages/api/src/client/types/com/atproto/sync/notifyOfUpdate.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.notifyOfUpdate' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { /** Hostname of the current service (usually a PDS) that is notifying of update. */ hostname: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/sync/requestCrawl.ts b/packages/api/src/client/types/com/atproto/sync/requestCrawl.ts index 9b5ee51eb42..e3e54ce9592 100644 --- a/packages/api/src/client/types/com/atproto/sync/requestCrawl.ts +++ b/packages/api/src/client/types/com/atproto/sync/requestCrawl.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.requestCrawl' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { /** Hostname of the current service (eg, PDS) that is requesting to be crawled. */ hostname: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/sync/subscribeRepos.ts b/packages/api/src/client/types/com/atproto/sync/subscribeRepos.ts index 82cb59834fc..b06a8251b57 100644 --- a/packages/api/src/client/types/com/atproto/sync/subscribeRepos.ts +++ b/packages/api/src/client/types/com/atproto/sync/subscribeRepos.ts @@ -4,13 +4,14 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.sync.subscribeRepos' /** 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. */ export interface Commit { + $type?: 'com.atproto.sync.subscribeRepos#commit' /** The stream sequence number of this message. */ seq: number /** DEPRECATED -- unused */ @@ -33,7 +34,6 @@ export interface Commit { blobs: CID[] /** Timestamp of when this message was originally broadcast. */ time: string - [k: string]: unknown } export function isCommit( @@ -48,12 +48,12 @@ export function validateCommit(v: unknown) { /** 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. */ export interface Identity { + $type?: 'com.atproto.sync.subscribeRepos#identity' seq: number did: string time: string /** 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. */ handle?: string - [k: string]: unknown } export function isIdentity(v: unknown): v is Identity & { @@ -68,6 +68,7 @@ export function validateIdentity(v: unknown) { /** 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. */ export interface Account { + $type?: 'com.atproto.sync.subscribeRepos#account' seq: number did: string time: string @@ -75,7 +76,6 @@ export interface Account { active: boolean /** If active=false, this optional field indicates a reason for why the account is not active. */ status?: 'takendown' | 'suspended' | 'deleted' | 'deactivated' | (string & {}) - [k: string]: unknown } export function isAccount(v: unknown): v is Account & { @@ -90,11 +90,11 @@ export function validateAccount(v: unknown) { /** DEPRECATED -- Use #identity event instead */ export interface Handle { + $type?: 'com.atproto.sync.subscribeRepos#handle' seq: number did: string handle: string time: string - [k: string]: unknown } export function isHandle( @@ -109,11 +109,11 @@ export function validateHandle(v: unknown) { /** DEPRECATED -- Use #account event instead */ export interface Migrate { + $type?: 'com.atproto.sync.subscribeRepos#migrate' seq: number did: string migrateTo: string | null time: string - [k: string]: unknown } export function isMigrate(v: unknown): v is Migrate & { @@ -128,10 +128,10 @@ export function validateMigrate(v: unknown) { /** DEPRECATED -- Use #account event instead */ export interface Tombstone { + $type?: 'com.atproto.sync.subscribeRepos#tombstone' seq: number did: string time: string - [k: string]: unknown } export function isTombstone(v: unknown): v is Tombstone & { @@ -145,9 +145,9 @@ export function validateTombstone(v: unknown) { } export interface Info { + $type?: 'com.atproto.sync.subscribeRepos#info' name: 'OutdatedCursor' | (string & {}) message?: string - [k: string]: unknown } export function isInfo( @@ -162,11 +162,11 @@ export function validateInfo(v: unknown) { /** A repo operation, ie a mutation of a single record. */ export interface RepoOp { + $type?: 'com.atproto.sync.subscribeRepos#repoOp' action: 'create' | 'update' | 'delete' | (string & {}) path: string /** For creates and updates, the new record CID. For deletions, null. */ cid: CID | null - [k: string]: unknown } export function isRepoOp( diff --git a/packages/api/src/client/types/com/atproto/temp/checkSignupQueue.ts b/packages/api/src/client/types/com/atproto/temp/checkSignupQueue.ts index 12c1b5f3c7e..9fe156d926d 100644 --- a/packages/api/src/client/types/com/atproto/temp/checkSignupQueue.ts +++ b/packages/api/src/client/types/com/atproto/temp/checkSignupQueue.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.temp.checkSignupQueue' @@ -17,7 +17,6 @@ export interface OutputSchema { activated: boolean placeInQueue?: number estimatedTimeMs?: number - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/temp/fetchLabels.ts b/packages/api/src/client/types/com/atproto/temp/fetchLabels.ts index 76bad5080d3..54a8b8e5b62 100644 --- a/packages/api/src/client/types/com/atproto/temp/fetchLabels.ts +++ b/packages/api/src/client/types/com/atproto/temp/fetchLabels.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoLabelDefs from '../label/defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { labels: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/com/atproto/temp/requestPhoneVerification.ts b/packages/api/src/client/types/com/atproto/temp/requestPhoneVerification.ts index c7ad2ef5dc8..fb051a0965a 100644 --- a/packages/api/src/client/types/com/atproto/temp/requestPhoneVerification.ts +++ b/packages/api/src/client/types/com/atproto/temp/requestPhoneVerification.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'com.atproto.temp.requestPhoneVerification' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { phoneNumber: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/communication/createTemplate.ts b/packages/api/src/client/types/tools/ozone/communication/createTemplate.ts index c51dd840b90..f676f0c096c 100644 --- a/packages/api/src/client/types/tools/ozone/communication/createTemplate.ts +++ b/packages/api/src/client/types/tools/ozone/communication/createTemplate.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneCommunicationDefs from './defs' @@ -23,7 +23,6 @@ export interface InputSchema { lang?: string /** DID of the user who is creating the template. */ createdBy?: string - [k: string]: unknown } export type OutputSchema = ToolsOzoneCommunicationDefs.TemplateView diff --git a/packages/api/src/client/types/tools/ozone/communication/defs.ts b/packages/api/src/client/types/tools/ozone/communication/defs.ts index 9ffe06e7816..75c21c2f189 100644 --- a/packages/api/src/client/types/tools/ozone/communication/defs.ts +++ b/packages/api/src/client/types/tools/ozone/communication/defs.ts @@ -3,12 +3,13 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'tools.ozone.communication.defs' export interface TemplateView { + $type?: 'tools.ozone.communication.defs#templateView' id: string /** Name of the template. */ name: string @@ -23,7 +24,6 @@ export interface TemplateView { lastUpdatedBy: string createdAt: string updatedAt: string - [k: string]: unknown } export function isTemplateView(v: unknown): v is TemplateView & { diff --git a/packages/api/src/client/types/tools/ozone/communication/deleteTemplate.ts b/packages/api/src/client/types/tools/ozone/communication/deleteTemplate.ts index 126c4055969..f5dbedf64e3 100644 --- a/packages/api/src/client/types/tools/ozone/communication/deleteTemplate.ts +++ b/packages/api/src/client/types/tools/ozone/communication/deleteTemplate.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'tools.ozone.communication.deleteTemplate' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { id: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/communication/listTemplates.ts b/packages/api/src/client/types/tools/ozone/communication/listTemplates.ts index d84e2f6fa91..394d99e31f1 100644 --- a/packages/api/src/client/types/tools/ozone/communication/listTemplates.ts +++ b/packages/api/src/client/types/tools/ozone/communication/listTemplates.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneCommunicationDefs from './defs' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { communicationTemplates: ToolsOzoneCommunicationDefs.TemplateView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/communication/updateTemplate.ts b/packages/api/src/client/types/tools/ozone/communication/updateTemplate.ts index 97514121a3c..8ba7f20e8ea 100644 --- a/packages/api/src/client/types/tools/ozone/communication/updateTemplate.ts +++ b/packages/api/src/client/types/tools/ozone/communication/updateTemplate.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneCommunicationDefs from './defs' @@ -26,7 +26,6 @@ export interface InputSchema { /** DID of the user who is updating the template. */ updatedBy?: string disabled?: boolean - [k: string]: unknown } export type OutputSchema = ToolsOzoneCommunicationDefs.TemplateView diff --git a/packages/api/src/client/types/tools/ozone/moderation/defs.ts b/packages/api/src/client/types/tools/ozone/moderation/defs.ts index 5a9a7fe5d31..3c82cf16b69 100644 --- a/packages/api/src/client/types/tools/ozone/moderation/defs.ts +++ b/packages/api/src/client/types/tools/ozone/moderation/defs.ts @@ -3,7 +3,7 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' @@ -15,6 +15,7 @@ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'tools.ozone.moderation.defs' export interface ModEventView { + $type?: 'tools.ozone.moderation.defs#modEventView' id: number event: | ModEventTakedown @@ -46,7 +47,6 @@ export interface ModEventView { createdAt: string creatorHandle?: string subjectHandle?: string - [k: string]: unknown } export function isModEventView(v: unknown): v is ModEventView & { @@ -63,6 +63,7 @@ export function validateModEventView(v: unknown) { } export interface ModEventViewDetail { + $type?: 'tools.ozone.moderation.defs#modEventViewDetail' id: number event: | ModEventTakedown @@ -93,7 +94,6 @@ export interface ModEventViewDetail { subjectBlobs: BlobView[] createdBy: string createdAt: string - [k: string]: unknown } export function isModEventViewDetail(v: unknown): v is ModEventViewDetail & { @@ -110,6 +110,7 @@ export function validateModEventViewDetail(v: unknown) { } export interface SubjectStatusView { + $type?: 'tools.ozone.moderation.defs#subjectStatusView' id: number subject: | ComAtprotoAdminDefs.RepoRef @@ -140,7 +141,6 @@ export interface SubjectStatusView { appealed?: boolean suspendUntil?: string tags?: string[] - [k: string]: unknown } export function isSubjectStatusView(v: unknown): v is SubjectStatusView & { @@ -174,12 +174,12 @@ export const REVIEWNONE = 'tools.ozone.moderation.defs#reviewNone' /** Take down a subject permanently or temporarily */ export interface ModEventTakedown { + $type?: 'tools.ozone.moderation.defs#modEventTakedown' comment?: string /** Indicates how long the takedown should be in effect before automatically expiring. */ durationInHours?: number /** If true, all other reports on content authored by this account will be resolved (acknowledged). */ acknowledgeAccountSubjects?: boolean - [k: string]: unknown } export function isModEventTakedown(v: unknown): v is ModEventTakedown & { @@ -197,9 +197,9 @@ export function validateModEventTakedown(v: unknown) { /** Revert take down action on a subject */ export interface ModEventReverseTakedown { + $type?: 'tools.ozone.moderation.defs#modEventReverseTakedown' /** Describe reasoning behind the reversal. */ comment?: string - [k: string]: unknown } export function isModEventReverseTakedown( @@ -219,9 +219,9 @@ export function validateModEventReverseTakedown(v: unknown) { /** Resolve appeal on a subject */ export interface ModEventResolveAppeal { + $type?: 'tools.ozone.moderation.defs#modEventResolveAppeal' /** Describe resolution. */ comment?: string - [k: string]: unknown } export function isModEventResolveAppeal( @@ -241,10 +241,10 @@ export function validateModEventResolveAppeal(v: unknown) { /** Add a comment to a subject */ export interface ModEventComment { + $type?: 'tools.ozone.moderation.defs#modEventComment' comment: string /** Make the comment persistent on the subject */ sticky?: boolean - [k: string]: unknown } export function isModEventComment(v: unknown): v is ModEventComment & { @@ -262,11 +262,11 @@ export function validateModEventComment(v: unknown) { /** Report a subject */ export interface ModEventReport { + $type?: 'tools.ozone.moderation.defs#modEventReport' comment?: string /** 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. */ isReporterMuted?: boolean reportType: ComAtprotoModerationDefs.ReasonType - [k: string]: unknown } export function isModEventReport(v: unknown): v is ModEventReport & { @@ -284,10 +284,10 @@ export function validateModEventReport(v: unknown) { /** Apply/Negate labels on a subject */ export interface ModEventLabel { + $type?: 'tools.ozone.moderation.defs#modEventLabel' comment?: string createLabelVals: string[] negateLabelVals: string[] - [k: string]: unknown } export function isModEventLabel(v: unknown): v is ModEventLabel & { @@ -304,8 +304,8 @@ export function validateModEventLabel(v: unknown) { } export interface ModEventAcknowledge { + $type?: 'tools.ozone.moderation.defs#modEventAcknowledge' comment?: string - [k: string]: unknown } export function isModEventAcknowledge(v: unknown): v is ModEventAcknowledge & { @@ -322,8 +322,8 @@ export function validateModEventAcknowledge(v: unknown) { } export interface ModEventEscalate { + $type?: 'tools.ozone.moderation.defs#modEventEscalate' comment?: string - [k: string]: unknown } export function isModEventEscalate(v: unknown): v is ModEventEscalate & { @@ -341,10 +341,10 @@ export function validateModEventEscalate(v: unknown) { /** Mute incoming reports on a subject */ export interface ModEventMute { + $type?: 'tools.ozone.moderation.defs#modEventMute' comment?: string /** Indicates how long the subject should remain muted. */ durationInHours: number - [k: string]: unknown } export function isModEventMute(v: unknown): v is ModEventMute & { @@ -362,9 +362,9 @@ export function validateModEventMute(v: unknown) { /** Unmute action on a subject */ export interface ModEventUnmute { + $type?: 'tools.ozone.moderation.defs#modEventUnmute' /** Describe reasoning behind the reversal. */ comment?: string - [k: string]: unknown } export function isModEventUnmute(v: unknown): v is ModEventUnmute & { @@ -382,10 +382,10 @@ export function validateModEventUnmute(v: unknown) { /** Mute incoming reports from an account */ export interface ModEventMuteReporter { + $type?: 'tools.ozone.moderation.defs#modEventMuteReporter' comment?: string /** Indicates how long the account should remain muted. Falsy value here means a permanent mute. */ durationInHours?: number - [k: string]: unknown } export function isModEventMuteReporter( @@ -405,9 +405,9 @@ export function validateModEventMuteReporter(v: unknown) { /** Unmute incoming reports from an account */ export interface ModEventUnmuteReporter { + $type?: 'tools.ozone.moderation.defs#modEventUnmuteReporter' /** Describe reasoning behind the reversal. */ comment?: string - [k: string]: unknown } export function isModEventUnmuteReporter( @@ -427,13 +427,13 @@ export function validateModEventUnmuteReporter(v: unknown) { /** Keep a log of outgoing email to a user */ export interface ModEventEmail { + $type?: 'tools.ozone.moderation.defs#modEventEmail' /** The subject line of the email sent to the user. */ subjectLine: string /** The content of the email sent to the user. */ content?: string /** Additional comment about the outgoing comm. */ comment?: string - [k: string]: unknown } export function isModEventEmail(v: unknown): v is ModEventEmail & { @@ -451,8 +451,8 @@ export function validateModEventEmail(v: unknown) { /** Divert a record's blobs to a 3rd party service for further scanning/tagging */ export interface ModEventDivert { + $type?: 'tools.ozone.moderation.defs#modEventDivert' comment?: string - [k: string]: unknown } export function isModEventDivert(v: unknown): v is ModEventDivert & { @@ -470,13 +470,13 @@ export function validateModEventDivert(v: unknown) { /** Add/Remove a tag on a subject */ export interface ModEventTag { + $type?: 'tools.ozone.moderation.defs#modEventTag' /** Tags to be added to the subject. If already exists, won't be duplicated. */ add: string[] /** Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. */ remove: string[] /** Additional comment about added/removed tags. */ comment?: string - [k: string]: unknown } export function isModEventTag(v: unknown): v is ModEventTag & { @@ -494,6 +494,7 @@ export function validateModEventTag(v: unknown) { /** Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. */ export interface AccountEvent { + $type?: 'tools.ozone.moderation.defs#accountEvent' comment?: string /** Indicates that the account has a repository which can be fetched from the host that emitted this event. */ active: boolean @@ -506,7 +507,6 @@ export interface AccountEvent { | 'tombstoned' | (string & {}) timestamp: string - [k: string]: unknown } export function isAccountEvent(v: unknown): v is AccountEvent & { @@ -524,12 +524,12 @@ export function validateAccountEvent(v: unknown) { /** Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. */ export interface IdentityEvent { + $type?: 'tools.ozone.moderation.defs#identityEvent' comment?: string handle?: string pdsHost?: string tombstone?: boolean timestamp: string - [k: string]: unknown } export function isIdentityEvent(v: unknown): v is IdentityEvent & { @@ -547,11 +547,11 @@ export function validateIdentityEvent(v: unknown) { /** Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. */ export interface RecordEvent { + $type?: 'tools.ozone.moderation.defs#recordEvent' comment?: string op: 'create' | 'update' | 'delete' | (string & {}) cid?: string timestamp: string - [k: string]: unknown } export function isRecordEvent(v: unknown): v is RecordEvent & { @@ -568,10 +568,11 @@ export function validateRecordEvent(v: unknown) { } export interface RepoView { + $type?: 'tools.ozone.moderation.defs#repoView' did: string handle: string email?: string - relatedRecords: {}[] + relatedRecords: { [_ in string]: unknown }[] indexedAt: string moderation: Moderation invitedBy?: ComAtprotoServerDefs.InviteCode @@ -579,7 +580,6 @@ export interface RepoView { inviteNote?: string deactivatedAt?: string threatSignatures?: ComAtprotoAdminDefs.ThreatSignature[] - [k: string]: unknown } export function isRepoView( @@ -593,10 +593,11 @@ export function validateRepoView(v: unknown) { } export interface RepoViewDetail { + $type?: 'tools.ozone.moderation.defs#repoViewDetail' did: string handle: string email?: string - relatedRecords: {}[] + relatedRecords: { [_ in string]: unknown }[] indexedAt: string moderation: ModerationDetail labels?: ComAtprotoLabelDefs.Label[] @@ -607,7 +608,6 @@ export interface RepoViewDetail { emailConfirmedAt?: string deactivatedAt?: string threatSignatures?: ComAtprotoAdminDefs.ThreatSignature[] - [k: string]: unknown } export function isRepoViewDetail(v: unknown): v is RepoViewDetail & { @@ -624,8 +624,8 @@ export function validateRepoViewDetail(v: unknown) { } export interface RepoViewNotFound { + $type?: 'tools.ozone.moderation.defs#repoViewNotFound' did: string - [k: string]: unknown } export function isRepoViewNotFound(v: unknown): v is RepoViewNotFound & { @@ -642,14 +642,14 @@ export function validateRepoViewNotFound(v: unknown) { } export interface RecordView { + $type?: 'tools.ozone.moderation.defs#recordView' uri: string cid: string - value: {} + value: { [_ in string]: unknown } blobCids: string[] indexedAt: string moderation: Moderation repo: RepoView - [k: string]: unknown } export function isRecordView(v: unknown): v is RecordView & { @@ -666,15 +666,15 @@ export function validateRecordView(v: unknown) { } export interface RecordViewDetail { + $type?: 'tools.ozone.moderation.defs#recordViewDetail' uri: string cid: string - value: {} + value: { [_ in string]: unknown } blobs: BlobView[] labels?: ComAtprotoLabelDefs.Label[] indexedAt: string moderation: ModerationDetail repo: RepoView - [k: string]: unknown } export function isRecordViewDetail(v: unknown): v is RecordViewDetail & { @@ -691,8 +691,8 @@ export function validateRecordViewDetail(v: unknown) { } export interface RecordViewNotFound { + $type?: 'tools.ozone.moderation.defs#recordViewNotFound' uri: string - [k: string]: unknown } export function isRecordViewNotFound(v: unknown): v is RecordViewNotFound & { @@ -709,8 +709,8 @@ export function validateRecordViewNotFound(v: unknown) { } export interface Moderation { + $type?: 'tools.ozone.moderation.defs#moderation' subjectStatus?: SubjectStatusView - [k: string]: unknown } export function isModeration(v: unknown): v is Moderation & { @@ -727,8 +727,8 @@ export function validateModeration(v: unknown) { } export interface ModerationDetail { + $type?: 'tools.ozone.moderation.defs#moderationDetail' subjectStatus?: SubjectStatusView - [k: string]: unknown } export function isModerationDetail(v: unknown): v is ModerationDetail & { @@ -745,6 +745,7 @@ export function validateModerationDetail(v: unknown) { } export interface BlobView { + $type?: 'tools.ozone.moderation.defs#blobView' cid: string mimeType: string size: number @@ -754,7 +755,6 @@ export interface BlobView { | VideoDetails | { $type: string; [k: string]: unknown } moderation?: Moderation - [k: string]: unknown } export function isBlobView( @@ -768,9 +768,9 @@ export function validateBlobView(v: unknown) { } export interface ImageDetails { + $type?: 'tools.ozone.moderation.defs#imageDetails' width: number height: number - [k: string]: unknown } export function isImageDetails(v: unknown): v is ImageDetails & { @@ -787,10 +787,10 @@ export function validateImageDetails(v: unknown) { } export interface VideoDetails { + $type?: 'tools.ozone.moderation.defs#videoDetails' width: number height: number length: number - [k: string]: unknown } export function isVideoDetails(v: unknown): v is VideoDetails & { @@ -807,6 +807,7 @@ export function validateVideoDetails(v: unknown) { } export interface AccountHosting { + $type?: 'tools.ozone.moderation.defs#accountHosting' status: | 'takendown' | 'suspended' @@ -819,7 +820,6 @@ export interface AccountHosting { deletedAt?: string deactivatedAt?: string reactivatedAt?: string - [k: string]: unknown } export function isAccountHosting(v: unknown): v is AccountHosting & { @@ -836,11 +836,11 @@ export function validateAccountHosting(v: unknown) { } export interface RecordHosting { + $type?: 'tools.ozone.moderation.defs#recordHosting' status: 'deleted' | 'unknown' | (string & {}) updatedAt?: string createdAt?: string deletedAt?: string - [k: string]: unknown } export function isRecordHosting(v: unknown): v is RecordHosting & { diff --git a/packages/api/src/client/types/tools/ozone/moderation/emitEvent.ts b/packages/api/src/client/types/tools/ozone/moderation/emitEvent.ts index 8ada2c5499b..50a3652ab76 100644 --- a/packages/api/src/client/types/tools/ozone/moderation/emitEvent.ts +++ b/packages/api/src/client/types/tools/ozone/moderation/emitEvent.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneModerationDefs from './defs' import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs' @@ -40,7 +40,6 @@ export interface InputSchema { | { $type: string; [k: string]: unknown } subjectBlobCids?: string[] createdBy: string - [k: string]: unknown } export type OutputSchema = ToolsOzoneModerationDefs.ModEventView diff --git a/packages/api/src/client/types/tools/ozone/moderation/getEvent.ts b/packages/api/src/client/types/tools/ozone/moderation/getEvent.ts index ec526cc6eb2..6c3a1a49605 100644 --- a/packages/api/src/client/types/tools/ozone/moderation/getEvent.ts +++ b/packages/api/src/client/types/tools/ozone/moderation/getEvent.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneModerationDefs from './defs' diff --git a/packages/api/src/client/types/tools/ozone/moderation/getRecord.ts b/packages/api/src/client/types/tools/ozone/moderation/getRecord.ts index 3caf8719339..3f3448967e6 100644 --- a/packages/api/src/client/types/tools/ozone/moderation/getRecord.ts +++ b/packages/api/src/client/types/tools/ozone/moderation/getRecord.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneModerationDefs from './defs' diff --git a/packages/api/src/client/types/tools/ozone/moderation/getRecords.ts b/packages/api/src/client/types/tools/ozone/moderation/getRecords.ts index 221dd995419..953f3e52512 100644 --- a/packages/api/src/client/types/tools/ozone/moderation/getRecords.ts +++ b/packages/api/src/client/types/tools/ozone/moderation/getRecords.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneModerationDefs from './defs' @@ -22,7 +22,6 @@ export interface OutputSchema { | ToolsOzoneModerationDefs.RecordViewNotFound | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/moderation/getRepo.ts b/packages/api/src/client/types/tools/ozone/moderation/getRepo.ts index 588fb1062ee..e82b3942bb8 100644 --- a/packages/api/src/client/types/tools/ozone/moderation/getRepo.ts +++ b/packages/api/src/client/types/tools/ozone/moderation/getRepo.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneModerationDefs from './defs' diff --git a/packages/api/src/client/types/tools/ozone/moderation/getRepos.ts b/packages/api/src/client/types/tools/ozone/moderation/getRepos.ts index a2c4fdfbb83..f381f455f26 100644 --- a/packages/api/src/client/types/tools/ozone/moderation/getRepos.ts +++ b/packages/api/src/client/types/tools/ozone/moderation/getRepos.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneModerationDefs from './defs' @@ -22,7 +22,6 @@ export interface OutputSchema { | ToolsOzoneModerationDefs.RepoViewNotFound | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/moderation/queryEvents.ts b/packages/api/src/client/types/tools/ozone/moderation/queryEvents.ts index 35d6eb8ed9e..f5d4810dcc6 100644 --- a/packages/api/src/client/types/tools/ozone/moderation/queryEvents.ts +++ b/packages/api/src/client/types/tools/ozone/moderation/queryEvents.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneModerationDefs from './defs' @@ -49,7 +49,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string events: ToolsOzoneModerationDefs.ModEventView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/moderation/queryStatuses.ts b/packages/api/src/client/types/tools/ozone/moderation/queryStatuses.ts index dec3542a071..ab8ad41d405 100644 --- a/packages/api/src/client/types/tools/ozone/moderation/queryStatuses.ts +++ b/packages/api/src/client/types/tools/ozone/moderation/queryStatuses.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneModerationDefs from './defs' @@ -65,7 +65,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string subjectStatuses: ToolsOzoneModerationDefs.SubjectStatusView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/moderation/searchRepos.ts b/packages/api/src/client/types/tools/ozone/moderation/searchRepos.ts index 41593c0a9dd..7142d05b1c4 100644 --- a/packages/api/src/client/types/tools/ozone/moderation/searchRepos.ts +++ b/packages/api/src/client/types/tools/ozone/moderation/searchRepos.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneModerationDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string repos: ToolsOzoneModerationDefs.RepoView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/server/getConfig.ts b/packages/api/src/client/types/tools/ozone/server/getConfig.ts index 92b65b599eb..c5cbc0326f9 100644 --- a/packages/api/src/client/types/tools/ozone/server/getConfig.ts +++ b/packages/api/src/client/types/tools/ozone/server/getConfig.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'tools.ozone.server.getConfig' @@ -19,7 +19,6 @@ export interface OutputSchema { blobDivert?: ServiceConfig chat?: ServiceConfig viewer?: ViewerConfig - [k: string]: unknown } export interface CallOptions { @@ -38,8 +37,8 @@ export function toKnownErr(e: any) { } export interface ServiceConfig { + $type?: 'tools.ozone.server.getConfig#serviceConfig' url?: string - [k: string]: unknown } export function isServiceConfig(v: unknown): v is ServiceConfig & { @@ -56,12 +55,12 @@ export function validateServiceConfig(v: unknown) { } export interface ViewerConfig { + $type?: 'tools.ozone.server.getConfig#viewerConfig' role?: | 'tools.ozone.team.defs#roleAdmin' | 'tools.ozone.team.defs#roleModerator' | 'tools.ozone.team.defs#roleTriage' | (string & {}) - [k: string]: unknown } export function isViewerConfig(v: unknown): v is ViewerConfig & { diff --git a/packages/api/src/client/types/tools/ozone/set/addValues.ts b/packages/api/src/client/types/tools/ozone/set/addValues.ts index 08450db5ba5..871b7340b93 100644 --- a/packages/api/src/client/types/tools/ozone/set/addValues.ts +++ b/packages/api/src/client/types/tools/ozone/set/addValues.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'tools.ozone.set.addValues' @@ -16,7 +16,6 @@ export interface InputSchema { name: string /** Array of string values to add to the set */ values: string[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/set/defs.ts b/packages/api/src/client/types/tools/ozone/set/defs.ts index 6c82ac8c4b8..fbe4a7ff01a 100644 --- a/packages/api/src/client/types/tools/ozone/set/defs.ts +++ b/packages/api/src/client/types/tools/ozone/set/defs.ts @@ -3,15 +3,15 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'tools.ozone.set.defs' export interface Set { + $type?: 'tools.ozone.set.defs#set' name: string description?: string - [k: string]: unknown } export function isSet( @@ -25,12 +25,12 @@ export function validateSet(v: unknown) { } export interface SetView { + $type?: 'tools.ozone.set.defs#setView' name: string description?: string setSize: number createdAt: string updatedAt: string - [k: string]: unknown } export function isSetView( diff --git a/packages/api/src/client/types/tools/ozone/set/deleteSet.ts b/packages/api/src/client/types/tools/ozone/set/deleteSet.ts index 43ce9d14f29..069b53717c2 100644 --- a/packages/api/src/client/types/tools/ozone/set/deleteSet.ts +++ b/packages/api/src/client/types/tools/ozone/set/deleteSet.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'tools.ozone.set.deleteSet' @@ -14,12 +14,9 @@ export interface QueryParams {} export interface InputSchema { /** Name of the set to delete */ name: string - [k: string]: unknown } -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export interface CallOptions { signal?: AbortSignal diff --git a/packages/api/src/client/types/tools/ozone/set/deleteValues.ts b/packages/api/src/client/types/tools/ozone/set/deleteValues.ts index c7f26aef75b..e01845f8d40 100644 --- a/packages/api/src/client/types/tools/ozone/set/deleteValues.ts +++ b/packages/api/src/client/types/tools/ozone/set/deleteValues.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'tools.ozone.set.deleteValues' @@ -16,7 +16,6 @@ export interface InputSchema { name: string /** Array of string values to delete from the set */ values: string[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/set/getValues.ts b/packages/api/src/client/types/tools/ozone/set/getValues.ts index 4d0a838331d..afbddd1de58 100644 --- a/packages/api/src/client/types/tools/ozone/set/getValues.ts +++ b/packages/api/src/client/types/tools/ozone/set/getValues.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneSetDefs from './defs' @@ -22,7 +22,6 @@ export interface OutputSchema { set: ToolsOzoneSetDefs.SetView values: string[] cursor?: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/set/querySets.ts b/packages/api/src/client/types/tools/ozone/set/querySets.ts index 9aa8b2d79d5..31f4970d931 100644 --- a/packages/api/src/client/types/tools/ozone/set/querySets.ts +++ b/packages/api/src/client/types/tools/ozone/set/querySets.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneSetDefs from './defs' @@ -24,7 +24,6 @@ export type InputSchema = undefined export interface OutputSchema { sets: ToolsOzoneSetDefs.SetView[] cursor?: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/set/upsertSet.ts b/packages/api/src/client/types/tools/ozone/set/upsertSet.ts index 00fba4db24b..cfbd80d835a 100644 --- a/packages/api/src/client/types/tools/ozone/set/upsertSet.ts +++ b/packages/api/src/client/types/tools/ozone/set/upsertSet.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneSetDefs from './defs' diff --git a/packages/api/src/client/types/tools/ozone/setting/defs.ts b/packages/api/src/client/types/tools/ozone/setting/defs.ts index 1802a310323..11bc743606d 100644 --- a/packages/api/src/client/types/tools/ozone/setting/defs.ts +++ b/packages/api/src/client/types/tools/ozone/setting/defs.ts @@ -3,15 +3,16 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'tools.ozone.setting.defs' export interface Option { + $type?: 'tools.ozone.setting.defs#option' key: string did: string - value: {} + value: { [_ in string]: unknown } description?: string createdAt?: string updatedAt?: string @@ -23,7 +24,6 @@ export interface Option { scope: 'instance' | 'personal' | (string & {}) createdBy: string lastUpdatedBy: string - [k: string]: unknown } export function isOption( diff --git a/packages/api/src/client/types/tools/ozone/setting/listOptions.ts b/packages/api/src/client/types/tools/ozone/setting/listOptions.ts index 1746cbb11ea..658f23864d1 100644 --- a/packages/api/src/client/types/tools/ozone/setting/listOptions.ts +++ b/packages/api/src/client/types/tools/ozone/setting/listOptions.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneSettingDefs from './defs' @@ -25,7 +25,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string options: ToolsOzoneSettingDefs.Option[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/setting/removeOptions.ts b/packages/api/src/client/types/tools/ozone/setting/removeOptions.ts index 0f073ec39ad..9df5bc5e16b 100644 --- a/packages/api/src/client/types/tools/ozone/setting/removeOptions.ts +++ b/packages/api/src/client/types/tools/ozone/setting/removeOptions.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'tools.ozone.setting.removeOptions' @@ -14,12 +14,9 @@ export interface QueryParams {} export interface InputSchema { keys: string[] scope: 'instance' | 'personal' | (string & {}) - [k: string]: unknown } -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export interface CallOptions { signal?: AbortSignal diff --git a/packages/api/src/client/types/tools/ozone/setting/upsertOption.ts b/packages/api/src/client/types/tools/ozone/setting/upsertOption.ts index 221a8829655..ba369ea030f 100644 --- a/packages/api/src/client/types/tools/ozone/setting/upsertOption.ts +++ b/packages/api/src/client/types/tools/ozone/setting/upsertOption.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneSettingDefs from './defs' @@ -15,19 +15,17 @@ export interface QueryParams {} export interface InputSchema { key: string scope: 'instance' | 'personal' | (string & {}) - value: {} + value: { [_ in string]: unknown } description?: string managerRole?: | 'tools.ozone.team.defs#roleModerator' | 'tools.ozone.team.defs#roleTriage' | 'tools.ozone.team.defs#roleAdmin' | (string & {}) - [k: string]: unknown } export interface OutputSchema { option: ToolsOzoneSettingDefs.Option - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/signature/defs.ts b/packages/api/src/client/types/tools/ozone/signature/defs.ts index ecf48622152..da89e5a6d1e 100644 --- a/packages/api/src/client/types/tools/ozone/signature/defs.ts +++ b/packages/api/src/client/types/tools/ozone/signature/defs.ts @@ -3,15 +3,15 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'tools.ozone.signature.defs' export interface SigDetail { + $type?: 'tools.ozone.signature.defs#sigDetail' property: string value: string - [k: string]: unknown } export function isSigDetail(v: unknown): v is SigDetail & { diff --git a/packages/api/src/client/types/tools/ozone/signature/findCorrelation.ts b/packages/api/src/client/types/tools/ozone/signature/findCorrelation.ts index d9d83547f6a..86061af45a3 100644 --- a/packages/api/src/client/types/tools/ozone/signature/findCorrelation.ts +++ b/packages/api/src/client/types/tools/ozone/signature/findCorrelation.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneSignatureDefs from './defs' @@ -18,7 +18,6 @@ export type InputSchema = undefined export interface OutputSchema { details: ToolsOzoneSignatureDefs.SigDetail[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/signature/findRelatedAccounts.ts b/packages/api/src/client/types/tools/ozone/signature/findRelatedAccounts.ts index 0b904942e1f..b434b7c54f7 100644 --- a/packages/api/src/client/types/tools/ozone/signature/findRelatedAccounts.ts +++ b/packages/api/src/client/types/tools/ozone/signature/findRelatedAccounts.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs' import * as ToolsOzoneSignatureDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string accounts: RelatedAccount[] - [k: string]: unknown } export interface CallOptions { @@ -41,9 +40,9 @@ export function toKnownErr(e: any) { } export interface RelatedAccount { + $type?: 'tools.ozone.signature.findRelatedAccounts#relatedAccount' account: ComAtprotoAdminDefs.AccountView similarities?: ToolsOzoneSignatureDefs.SigDetail[] - [k: string]: unknown } export function isRelatedAccount(v: unknown): v is RelatedAccount & { diff --git a/packages/api/src/client/types/tools/ozone/signature/searchAccounts.ts b/packages/api/src/client/types/tools/ozone/signature/searchAccounts.ts index 800c417f499..8ebc9bcec41 100644 --- a/packages/api/src/client/types/tools/ozone/signature/searchAccounts.ts +++ b/packages/api/src/client/types/tools/ozone/signature/searchAccounts.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string accounts: ComAtprotoAdminDefs.AccountView[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/team/addMember.ts b/packages/api/src/client/types/tools/ozone/team/addMember.ts index 48f902f6456..255058a0528 100644 --- a/packages/api/src/client/types/tools/ozone/team/addMember.ts +++ b/packages/api/src/client/types/tools/ozone/team/addMember.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneTeamDefs from './defs' @@ -19,7 +19,6 @@ export interface InputSchema { | 'tools.ozone.team.defs#roleModerator' | 'tools.ozone.team.defs#roleTriage' | (string & {}) - [k: string]: unknown } export type OutputSchema = ToolsOzoneTeamDefs.Member diff --git a/packages/api/src/client/types/tools/ozone/team/defs.ts b/packages/api/src/client/types/tools/ozone/team/defs.ts index e90fa58af6c..ebd8b78ed46 100644 --- a/packages/api/src/client/types/tools/ozone/team/defs.ts +++ b/packages/api/src/client/types/tools/ozone/team/defs.ts @@ -3,13 +3,14 @@ */ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as AppBskyActorDefs from '../../../app/bsky/actor/defs' export const id = 'tools.ozone.team.defs' export interface Member { + $type?: 'tools.ozone.team.defs#member' did: string disabled?: boolean profile?: AppBskyActorDefs.ProfileViewDetailed @@ -21,7 +22,6 @@ export interface Member { | 'lex:tools.ozone.team.defs#roleModerator' | 'lex:tools.ozone.team.defs#roleTriage' | (string & {}) - [k: string]: unknown } export function isMember( diff --git a/packages/api/src/client/types/tools/ozone/team/deleteMember.ts b/packages/api/src/client/types/tools/ozone/team/deleteMember.ts index bb23aadb925..df7b6ddfcd6 100644 --- a/packages/api/src/client/types/tools/ozone/team/deleteMember.ts +++ b/packages/api/src/client/types/tools/ozone/team/deleteMember.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' export const id = 'tools.ozone.team.deleteMember' @@ -13,7 +13,6 @@ export interface QueryParams {} export interface InputSchema { did: string - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/team/listMembers.ts b/packages/api/src/client/types/tools/ozone/team/listMembers.ts index 0525cd839f2..549c3b3d5b8 100644 --- a/packages/api/src/client/types/tools/ozone/team/listMembers.ts +++ b/packages/api/src/client/types/tools/ozone/team/listMembers.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneTeamDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string members: ToolsOzoneTeamDefs.Member[] - [k: string]: unknown } export interface CallOptions { diff --git a/packages/api/src/client/types/tools/ozone/team/updateMember.ts b/packages/api/src/client/types/tools/ozone/team/updateMember.ts index 44750fde2d6..d56afd6145e 100644 --- a/packages/api/src/client/types/tools/ozone/team/updateMember.ts +++ b/packages/api/src/client/types/tools/ozone/team/updateMember.ts @@ -4,7 +4,7 @@ import { HeadersMap, XRPCError } from '@atproto/xrpc' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { lexicons } from '../../../../lexicons' import * as ToolsOzoneTeamDefs from './defs' @@ -20,7 +20,6 @@ export interface InputSchema { | 'tools.ozone.team.defs#roleModerator' | 'tools.ozone.team.defs#roleTriage' | (string & {}) - [k: string]: unknown } export type OutputSchema = ToolsOzoneTeamDefs.Member diff --git a/packages/api/src/client/util.ts b/packages/api/src/client/util.ts index c7e9539d1f1..238eabe8742 100644 --- a/packages/api/src/client/util.ts +++ b/packages/api/src/client/util.ts @@ -1,6 +1,10 @@ /** * GENERATED CODE - DO NOT MODIFY */ +export type OmitKey = { + [K2 in keyof T as K2 extends K ? never : K2]: T[K2] +} + export type $Type = Hash extends 'main' ? Id | `${Id}#${Hash}` : `${Id}#${Hash}` diff --git a/packages/bsky/src/lexicon/lexicons.ts b/packages/bsky/src/lexicon/lexicons.ts index 79ce64e49e7..dff1f5cc660 100644 --- a/packages/bsky/src/lexicon/lexicons.ts +++ b/packages/bsky/src/lexicon/lexicons.ts @@ -10774,4 +10774,4 @@ export const ids = { ChatBskyModerationGetActorMetadata: 'chat.bsky.moderation.getActorMetadata', ChatBskyModerationGetMessageContext: 'chat.bsky.moderation.getMessageContext', ChatBskyModerationUpdateActorAccess: 'chat.bsky.moderation.updateActorAccess', -} +} as const diff --git a/packages/bsky/src/lexicon/types/app/bsky/actor/defs.ts b/packages/bsky/src/lexicon/types/app/bsky/actor/defs.ts index 328965f4b18..2639dd12a1b 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/actor/defs.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/actor/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' import * as AppBskyGraphDefs from '../graph/defs' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' @@ -12,6 +12,7 @@ import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.actor.defs' export interface ProfileViewBasic { + $type?: 'app.bsky.actor.defs#profileViewBasic' did: string handle: string displayName?: string @@ -20,7 +21,6 @@ export interface ProfileViewBasic { viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] createdAt?: string - [k: string]: unknown } export function isProfileViewBasic(v: unknown): v is ProfileViewBasic & { @@ -37,6 +37,7 @@ export function validateProfileViewBasic(v: unknown) { } export interface ProfileView { + $type?: 'app.bsky.actor.defs#profileView' did: string handle: string displayName?: string @@ -47,7 +48,6 @@ export interface ProfileView { createdAt?: string viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isProfileView( @@ -64,6 +64,7 @@ export function validateProfileView(v: unknown) { } export interface ProfileViewDetailed { + $type?: 'app.bsky.actor.defs#profileViewDetailed' did: string handle: string displayName?: string @@ -80,7 +81,6 @@ export interface ProfileViewDetailed { viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] pinnedPost?: ComAtprotoRepoStrongRef.Main - [k: string]: unknown } export function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed & { @@ -97,12 +97,12 @@ export function validateProfileViewDetailed(v: unknown) { } export interface ProfileAssociated { + $type?: 'app.bsky.actor.defs#profileAssociated' lists?: number feedgens?: number starterPacks?: number labeler?: boolean chat?: ProfileAssociatedChat - [k: string]: unknown } export function isProfileAssociated(v: unknown): v is ProfileAssociated & { @@ -119,8 +119,8 @@ export function validateProfileAssociated(v: unknown) { } export interface ProfileAssociatedChat { + $type?: 'app.bsky.actor.defs#profileAssociatedChat' allowIncoming: 'all' | 'none' | 'following' | (string & {}) - [k: string]: unknown } export function isProfileAssociatedChat( @@ -140,6 +140,7 @@ export function validateProfileAssociatedChat(v: unknown) { /** 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 @@ -148,7 +149,6 @@ export interface ViewerState { following?: string followedBy?: string knownFollowers?: KnownFollowers - [k: string]: unknown } export function isViewerState( @@ -166,9 +166,9 @@ export function validateViewerState(v: unknown) { /** The subject's followers whom you also follow */ export interface KnownFollowers { + $type?: 'app.bsky.actor.defs#knownFollowers' count: number followers: ProfileViewBasic[] - [k: string]: unknown } export function isKnownFollowers(v: unknown): v is KnownFollowers & { @@ -201,8 +201,8 @@ export type Preferences = ( )[] export interface AdultContentPref { + $type?: 'app.bsky.actor.defs#adultContentPref' enabled: boolean - [k: string]: unknown } export function isAdultContentPref(v: unknown): v is AdultContentPref & { @@ -219,11 +219,11 @@ export function validateAdultContentPref(v: unknown) { } 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 & {}) - [k: string]: unknown } export function isContentLabelPref(v: unknown): v is ContentLabelPref & { @@ -240,11 +240,11 @@ export function validateContentLabelPref(v: unknown) { } export interface SavedFeed { + $type?: 'app.bsky.actor.defs#savedFeed' id: string type: 'feed' | 'list' | 'timeline' | (string & {}) value: string pinned: boolean - [k: string]: unknown } export function isSavedFeed( @@ -258,8 +258,8 @@ export function validateSavedFeed(v: unknown) { } export interface SavedFeedsPrefV2 { + $type?: 'app.bsky.actor.defs#savedFeedsPrefV2' items: SavedFeed[] - [k: string]: unknown } export function isSavedFeedsPrefV2(v: unknown): v is SavedFeedsPrefV2 & { @@ -276,10 +276,10 @@ export function validateSavedFeedsPrefV2(v: unknown) { } export interface SavedFeedsPref { + $type?: 'app.bsky.actor.defs#savedFeedsPref' pinned: string[] saved: string[] timelineIndex?: number - [k: string]: unknown } export function isSavedFeedsPref(v: unknown): v is SavedFeedsPref & { @@ -296,9 +296,9 @@ export function validateSavedFeedsPref(v: unknown) { } export interface PersonalDetailsPref { + $type?: 'app.bsky.actor.defs#personalDetailsPref' /** The birth date of account owner. */ birthDate?: string - [k: string]: unknown } export function isPersonalDetailsPref(v: unknown): v is PersonalDetailsPref & { @@ -315,6 +315,7 @@ export function validatePersonalDetailsPref(v: unknown) { } 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. */ @@ -327,7 +328,6 @@ export interface FeedViewPref { hideReposts?: boolean /** Hide quote posts in the feed. */ hideQuotePosts?: boolean - [k: string]: unknown } export function isFeedViewPref( @@ -344,11 +344,11 @@ export function validateFeedViewPref(v: unknown) { } export interface ThreadViewPref { + $type?: 'app.bsky.actor.defs#threadViewPref' /** Sorting mode for threads. */ sort?: 'oldest' | 'newest' | 'most-likes' | 'random' | (string & {}) /** Show followed users at the top of all replies. */ prioritizeFollowedUsers?: boolean - [k: string]: unknown } export function isThreadViewPref(v: unknown): v is ThreadViewPref & { @@ -365,9 +365,9 @@ export function validateThreadViewPref(v: unknown) { } 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[] - [k: string]: unknown } export function isInterestsPref(v: unknown): v is InterestsPref & { @@ -387,6 +387,7 @@ export type MutedWordTarget = 'content' | 'tag' | (string & {}) /** 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 @@ -396,7 +397,6 @@ export interface MutedWord { actorTarget: 'all' | 'exclude-following' | (string & {}) /** The date and time at which the muted word will expire and no longer be applied. */ expiresAt?: string - [k: string]: unknown } export function isMutedWord( @@ -410,9 +410,9 @@ export function validateMutedWord(v: unknown) { } export interface MutedWordsPref { + $type?: 'app.bsky.actor.defs#mutedWordsPref' /** A list of words the account owner has muted. */ items: MutedWord[] - [k: string]: unknown } export function isMutedWordsPref(v: unknown): v is MutedWordsPref & { @@ -429,9 +429,9 @@ export function validateMutedWordsPref(v: unknown) { } export interface HiddenPostsPref { + $type?: 'app.bsky.actor.defs#hiddenPostsPref' /** A list of URIs of posts the account owner has hidden. */ items: string[] - [k: string]: unknown } export function isHiddenPostsPref(v: unknown): v is HiddenPostsPref & { @@ -448,8 +448,8 @@ export function validateHiddenPostsPref(v: unknown) { } export interface LabelersPref { + $type?: 'app.bsky.actor.defs#labelersPref' labelers: LabelerPrefItem[] - [k: string]: unknown } export function isLabelersPref( @@ -466,8 +466,8 @@ export function validateLabelersPref(v: unknown) { } export interface LabelerPrefItem { + $type?: 'app.bsky.actor.defs#labelerPrefItem' did: string - [k: string]: unknown } export function isLabelerPrefItem(v: unknown): v is LabelerPrefItem & { @@ -485,12 +485,12 @@ export function validateLabelerPrefItem(v: unknown) { /** 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[] - [k: string]: unknown } export function isBskyAppStatePref(v: unknown): v is BskyAppStatePref & { @@ -508,8 +508,8 @@ export function validateBskyAppStatePref(v: unknown) { /** 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 - [k: string]: unknown } export function isBskyAppProgressGuide( @@ -529,13 +529,13 @@ export function validateBskyAppProgressGuide(v: unknown) { /** 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 - [k: string]: unknown } export function isNux( diff --git a/packages/bsky/src/lexicon/types/app/bsky/actor/getPreferences.ts b/packages/bsky/src/lexicon/types/app/bsky/actor/getPreferences.ts index 05250886bac..0eaa39da433 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/actor/getPreferences.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/actor/getPreferences.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -17,7 +17,6 @@ export type InputSchema = undefined export interface OutputSchema { preferences: AppBskyActorDefs.Preferences - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/actor/getProfile.ts b/packages/bsky/src/lexicon/types/app/bsky/actor/getProfile.ts index 03f7ba1e696..7f88e389db6 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/actor/getProfile.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/actor/getProfile.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' diff --git a/packages/bsky/src/lexicon/types/app/bsky/actor/getProfiles.ts b/packages/bsky/src/lexicon/types/app/bsky/actor/getProfiles.ts index 812ee707643..75f82cd708a 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/actor/getProfiles.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/actor/getProfiles.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { profiles: AppBskyActorDefs.ProfileViewDetailed[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts b/packages/bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts index 6881ca4a977..03fba3565f5 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string actors: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/actor/profile.ts b/packages/bsky/src/lexicon/types/app/bsky/actor/profile.ts index 59193587c97..d884084db62 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/actor/profile.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/actor/profile.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.actor.profile' export interface Record { + $type?: 'app.bsky.actor.profile' | 'app.bsky.actor.profile#main' displayName?: string /** Free-form profile description text. */ description?: string diff --git a/packages/bsky/src/lexicon/types/app/bsky/actor/putPreferences.ts b/packages/bsky/src/lexicon/types/app/bsky/actor/putPreferences.ts index 98ec8ef5bbe..3910dc2397e 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/actor/putPreferences.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/actor/putPreferences.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { preferences: AppBskyActorDefs.Preferences - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/app/bsky/actor/searchActors.ts b/packages/bsky/src/lexicon/types/app/bsky/actor/searchActors.ts index 62a7b64110c..fac3a323ef6 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/actor/searchActors.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/actor/searchActors.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -25,7 +25,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string actors: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts b/packages/bsky/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts index 226a539deeb..f9aaad0f9a1 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { actors: AppBskyActorDefs.ProfileViewBasic[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/embed/defs.ts b/packages/bsky/src/lexicon/types/app/bsky/embed/defs.ts index 6e5086aebe2..d6f76b22906 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/embed/defs.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/embed/defs.ts @@ -4,15 +4,15 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export 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 - [k: string]: unknown } export function isAspectRatio( diff --git a/packages/bsky/src/lexicon/types/app/bsky/embed/external.ts b/packages/bsky/src/lexicon/types/app/bsky/embed/external.ts index 95ac98d8ad8..930b9cb69ad 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/embed/external.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/embed/external.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export 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' | 'app.bsky.embed.external#main' external: External - [k: string]: unknown } export function isMain( @@ -25,11 +25,11 @@ export function validateMain(v: unknown) { } export interface External { + $type?: 'app.bsky.embed.external#external' uri: string title: string description: string thumb?: BlobRef - [k: string]: unknown } export function isExternal( @@ -43,8 +43,8 @@ export function validateExternal(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.external#view' external: ViewExternal - [k: string]: unknown } export function isView( @@ -58,11 +58,11 @@ export function validateView(v: unknown) { } export interface ViewExternal { + $type?: 'app.bsky.embed.external#viewExternal' uri: string title: string description: string thumb?: string - [k: string]: unknown } export function isViewExternal(v: unknown): v is ViewExternal & { diff --git a/packages/bsky/src/lexicon/types/app/bsky/embed/images.ts b/packages/bsky/src/lexicon/types/app/bsky/embed/images.ts index dc2a1cb1592..e2200856388 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/embed/images.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/embed/images.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyEmbedDefs from './defs' export const id = 'app.bsky.embed.images' export interface Main { + $type?: 'app.bsky.embed.images' | 'app.bsky.embed.images#main' images: Image[] - [k: string]: unknown } export function isMain( @@ -25,11 +25,11 @@ export function validateMain(v: unknown) { } export interface Image { + $type?: 'app.bsky.embed.images#image' image: BlobRef /** Alt text description of the image, for accessibility. */ alt: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isImage( @@ -43,8 +43,8 @@ export function validateImage(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.images#view' images: ViewImage[] - [k: string]: unknown } export function isView( @@ -58,6 +58,7 @@ export function validateView(v: unknown) { } 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. */ @@ -65,7 +66,6 @@ export interface ViewImage { /** Alt text description of the image, for accessibility. */ alt: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isViewImage( diff --git a/packages/bsky/src/lexicon/types/app/bsky/embed/record.ts b/packages/bsky/src/lexicon/types/app/bsky/embed/record.ts index 7740a9f83ab..24e795211a1 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/embed/record.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/embed/record.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' import * as AppBskyFeedDefs from '../feed/defs' import * as AppBskyGraphDefs from '../graph/defs' @@ -19,8 +19,8 @@ import * as AppBskyEmbedRecordWithMedia from './recordWithMedia' export const id = 'app.bsky.embed.record' export interface Main { + $type?: 'app.bsky.embed.record' | 'app.bsky.embed.record#main' record: ComAtprotoRepoStrongRef.Main - [k: string]: unknown } export function isMain( @@ -34,6 +34,7 @@ export function validateMain(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.record#view' record: | ViewRecord | ViewNotFound @@ -44,7 +45,6 @@ export interface View { | AppBskyLabelerDefs.LabelerView | AppBskyGraphDefs.StarterPackViewBasic | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isView( @@ -58,11 +58,12 @@ export function validateView(v: unknown) { } export interface ViewRecord { + $type?: 'app.bsky.embed.record#viewRecord' uri: string cid: string author: AppBskyActorDefs.ProfileViewBasic /** The record data itself. */ - value: {} + value: { [_ in string]: unknown } labels?: ComAtprotoLabelDefs.Label[] replyCount?: number repostCount?: number @@ -77,7 +78,6 @@ export interface ViewRecord { | { $type: string; [k: string]: unknown } )[] indexedAt: string - [k: string]: unknown } export function isViewRecord( @@ -94,9 +94,9 @@ export function validateViewRecord(v: unknown) { } export interface ViewNotFound { + $type?: 'app.bsky.embed.record#viewNotFound' uri: string notFound: true - [k: string]: unknown } export function isViewNotFound(v: unknown): v is ViewNotFound & { @@ -113,10 +113,10 @@ export function validateViewNotFound(v: unknown) { } export interface ViewBlocked { + $type?: 'app.bsky.embed.record#viewBlocked' uri: string blocked: true author: AppBskyFeedDefs.BlockedAuthor - [k: string]: unknown } export function isViewBlocked( @@ -133,9 +133,9 @@ export function validateViewBlocked(v: unknown) { } export interface ViewDetached { + $type?: 'app.bsky.embed.record#viewDetached' uri: string detached: true - [k: string]: unknown } export function isViewDetached(v: unknown): v is ViewDetached & { diff --git a/packages/bsky/src/lexicon/types/app/bsky/embed/recordWithMedia.ts b/packages/bsky/src/lexicon/types/app/bsky/embed/recordWithMedia.ts index 46b9a019a81..060a8d92eda 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/embed/recordWithMedia.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/embed/recordWithMedia.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyEmbedRecord from './record' import * as AppBskyEmbedImages from './images' import * as AppBskyEmbedVideo from './video' @@ -13,13 +13,15 @@ import * as AppBskyEmbedExternal from './external' export const id = 'app.bsky.embed.recordWithMedia' export interface Main { + $type?: + | 'app.bsky.embed.recordWithMedia' + | 'app.bsky.embed.recordWithMedia#main' record: AppBskyEmbedRecord.Main media: | AppBskyEmbedImages.Main | AppBskyEmbedVideo.Main | AppBskyEmbedExternal.Main | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isMain( @@ -33,13 +35,13 @@ export function validateMain(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.recordWithMedia#view' record: AppBskyEmbedRecord.View media: | AppBskyEmbedImages.View | AppBskyEmbedVideo.View | AppBskyEmbedExternal.View | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isView( diff --git a/packages/bsky/src/lexicon/types/app/bsky/embed/video.ts b/packages/bsky/src/lexicon/types/app/bsky/embed/video.ts index c688d3eeb3a..5ab82479197 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/embed/video.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/embed/video.ts @@ -4,18 +4,18 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyEmbedDefs from './defs' export const id = 'app.bsky.embed.video' export interface Main { + $type?: 'app.bsky.embed.video' | 'app.bsky.embed.video#main' video: BlobRef captions?: Caption[] /** Alt text description of the video, for accessibility. */ alt?: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isMain( @@ -29,9 +29,9 @@ export function validateMain(v: unknown) { } export interface Caption { + $type?: 'app.bsky.embed.video#caption' lang: string file: BlobRef - [k: string]: unknown } export function isCaption( @@ -45,12 +45,12 @@ export function validateCaption(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.video#view' cid: string playlist: string thumbnail?: string alt?: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isView( diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/defs.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/defs.ts index 214907b3a54..3ccf73551e8 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/defs.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyActorDefs from '../actor/defs' import * as AppBskyEmbedImages from '../embed/images' import * as AppBskyEmbedVideo from '../embed/video' @@ -18,10 +18,11 @@ import * as AppBskyGraphDefs from '../graph/defs' export const id = 'app.bsky.feed.defs' export interface PostView { + $type?: 'app.bsky.feed.defs#postView' uri: string cid: string author: AppBskyActorDefs.ProfileViewBasic - record: {} + record: { [_ in string]: unknown } embed?: | AppBskyEmbedImages.View | AppBskyEmbedVideo.View @@ -37,7 +38,6 @@ export interface PostView { viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] threadgate?: ThreadgateView - [k: string]: unknown } export function isPostView( @@ -52,13 +52,13 @@ export function validatePostView(v: unknown) { /** 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 threadMuted?: boolean replyDisabled?: boolean embeddingDisabled?: boolean pinned?: boolean - [k: string]: unknown } export function isViewerState( @@ -75,12 +75,12 @@ export function validateViewerState(v: unknown) { } export interface FeedViewPost { + $type?: 'app.bsky.feed.defs#feedViewPost' post: PostView reply?: ReplyRef reason?: ReasonRepost | ReasonPin | { $type: string; [k: string]: unknown } /** Context provided by feed generator that may be passed back alongside interactions. */ feedContext?: string - [k: string]: unknown } export function isFeedViewPost( @@ -97,6 +97,7 @@ export function validateFeedViewPost(v: unknown) { } export interface ReplyRef { + $type?: 'app.bsky.feed.defs#replyRef' root: | PostView | NotFoundPost @@ -108,7 +109,6 @@ export interface ReplyRef { | BlockedPost | { $type: string; [k: string]: unknown } grandparentAuthor?: AppBskyActorDefs.ProfileViewBasic - [k: string]: unknown } export function isReplyRef( @@ -122,9 +122,9 @@ export function validateReplyRef(v: unknown) { } export interface ReasonRepost { + $type?: 'app.bsky.feed.defs#reasonRepost' by: AppBskyActorDefs.ProfileViewBasic indexedAt: string - [k: string]: unknown } export function isReasonRepost( @@ -141,7 +141,7 @@ export function validateReasonRepost(v: unknown) { } export interface ReasonPin { - [k: string]: unknown + $type?: 'app.bsky.feed.defs#reasonPin' } export function isReasonPin( @@ -155,6 +155,7 @@ export function validateReasonPin(v: unknown) { } export interface ThreadViewPost { + $type?: 'app.bsky.feed.defs#threadViewPost' post: PostView parent?: | ThreadViewPost @@ -167,7 +168,6 @@ export interface ThreadViewPost { | BlockedPost | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export function isThreadViewPost(v: unknown): v is ThreadViewPost & { @@ -184,9 +184,9 @@ export function validateThreadViewPost(v: unknown) { } export interface NotFoundPost { + $type?: 'app.bsky.feed.defs#notFoundPost' uri: string notFound: true - [k: string]: unknown } export function isNotFoundPost( @@ -203,10 +203,10 @@ export function validateNotFoundPost(v: unknown) { } export interface BlockedPost { + $type?: 'app.bsky.feed.defs#blockedPost' uri: string blocked: true author: BlockedAuthor - [k: string]: unknown } export function isBlockedPost( @@ -223,9 +223,9 @@ export function validateBlockedPost(v: unknown) { } export interface BlockedAuthor { + $type?: 'app.bsky.feed.defs#blockedAuthor' did: string viewer?: AppBskyActorDefs.ViewerState - [k: string]: unknown } export function isBlockedAuthor(v: unknown): v is BlockedAuthor & { @@ -242,6 +242,7 @@ export function validateBlockedAuthor(v: unknown) { } export interface GeneratorView { + $type?: 'app.bsky.feed.defs#generatorView' uri: string cid: string did: string @@ -255,7 +256,6 @@ export interface GeneratorView { labels?: ComAtprotoLabelDefs.Label[] viewer?: GeneratorViewerState indexedAt: string - [k: string]: unknown } export function isGeneratorView(v: unknown): v is GeneratorView & { @@ -272,8 +272,8 @@ export function validateGeneratorView(v: unknown) { } export interface GeneratorViewerState { + $type?: 'app.bsky.feed.defs#generatorViewerState' like?: string - [k: string]: unknown } export function isGeneratorViewerState( @@ -292,6 +292,7 @@ export function validateGeneratorViewerState(v: unknown) { } export interface SkeletonFeedPost { + $type?: 'app.bsky.feed.defs#skeletonFeedPost' post: string reason?: | SkeletonReasonRepost @@ -299,7 +300,6 @@ export interface SkeletonFeedPost { | { $type: string; [k: string]: unknown } /** Context that will be passed through to client and may be passed to feed generator back alongside interactions. */ feedContext?: string - [k: string]: unknown } export function isSkeletonFeedPost(v: unknown): v is SkeletonFeedPost & { @@ -316,8 +316,8 @@ export function validateSkeletonFeedPost(v: unknown) { } export interface SkeletonReasonRepost { + $type?: 'app.bsky.feed.defs#skeletonReasonRepost' repost: string - [k: string]: unknown } export function isSkeletonReasonRepost( @@ -336,7 +336,7 @@ export function validateSkeletonReasonRepost(v: unknown) { } export interface SkeletonReasonPin { - [k: string]: unknown + $type?: 'app.bsky.feed.defs#skeletonReasonPin' } export function isSkeletonReasonPin(v: unknown): v is SkeletonReasonPin & { @@ -353,11 +353,11 @@ export function validateSkeletonReasonPin(v: unknown) { } export interface ThreadgateView { + $type?: 'app.bsky.feed.defs#threadgateView' uri?: string cid?: string - record?: {} + record?: { [_ in string]: unknown } lists?: AppBskyGraphDefs.ListViewBasic[] - [k: string]: unknown } export function isThreadgateView(v: unknown): v is ThreadgateView & { @@ -374,6 +374,7 @@ export function validateThreadgateView(v: unknown) { } export interface Interaction { + $type?: 'app.bsky.feed.defs#interaction' item?: string event?: | 'app.bsky.feed.defs#requestLess' @@ -391,7 +392,6 @@ export interface Interaction { | (string & {}) /** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. */ feedContext?: string - [k: string]: unknown } export function isInteraction( diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts index e76c4e836da..f8cef3e6bf9 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.feed.describeFeedGenerator' @@ -18,7 +18,6 @@ export interface OutputSchema { did: string feeds: Feed[] links?: Links - [k: string]: unknown } export type HandlerInput = undefined @@ -47,8 +46,8 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Feed { + $type?: 'app.bsky.feed.describeFeedGenerator#feed' uri: string - [k: string]: unknown } export function isFeed( @@ -62,9 +61,9 @@ export function validateFeed(v: unknown) { } export interface Links { + $type?: 'app.bsky.feed.describeFeedGenerator#links' privacyPolicy?: string termsOfService?: string - [k: string]: unknown } export function isLinks(v: unknown): v is Links & { diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/generator.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/generator.ts index af54d689d16..09af4502f85 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/generator.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/generator.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyRichtextFacet from '../richtext/facet' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.feed.generator' export interface Record { + $type?: 'app.bsky.feed.generator' | 'app.bsky.feed.generator#main' did: string displayName: string description?: string diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getActorFeeds.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getActorFeeds.ts index 1d6e18a7c0f..92ef78e3fa1 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getActorFeeds.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getActorFeeds.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getActorLikes.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getActorLikes.ts index b08c59ca52f..99aeb585dfe 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getActorLikes.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getActorLikes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts index b750af2a05c..9c66a9955e9 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -30,7 +30,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getFeed.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getFeed.ts index 255200d8e0e..f613fc74716 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getFeed.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getFeed.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts index 72a8e62049b..5c8167d093f 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -24,7 +24,6 @@ export interface OutputSchema { isOnline: boolean /** Indicates whether the feed generator service is compatible with the record declaration. */ isValid: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts index 0ae7bcb02fc..0f1ece530d3 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts index 66a4422d697..6d65f590f5d 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.SkeletonFeedPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getLikes.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getLikes.ts index 2252a4a4684..180768c80c5 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getLikes.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getLikes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -27,7 +27,6 @@ export interface OutputSchema { cid?: string cursor?: string likes: Like[] - [k: string]: unknown } export type HandlerInput = undefined @@ -56,10 +55,10 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Like { + $type?: 'app.bsky.feed.getLikes#like' indexedAt: string createdAt: string actor: AppBskyActorDefs.ProfileView - [k: string]: unknown } export function isLike( diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getListFeed.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getListFeed.ts index 3863453bc4b..468a2d4302f 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getListFeed.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getListFeed.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getPostThread.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getPostThread.ts index af76f8129f3..12a0fdaefb9 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getPostThread.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getPostThread.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -29,7 +29,6 @@ export interface OutputSchema { | AppBskyFeedDefs.BlockedPost | { $type: string; [k: string]: unknown } threadgate?: AppBskyFeedDefs.ThreadgateView - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getPosts.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getPosts.ts index 5895857ac72..0bad32bfba9 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getPosts.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getPosts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { posts: AppBskyFeedDefs.PostView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getQuotes.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getQuotes.ts index afe599dce94..a0bdd075b14 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getQuotes.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getQuotes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -27,7 +27,6 @@ export interface OutputSchema { cid?: string cursor?: string posts: AppBskyFeedDefs.PostView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getRepostedBy.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getRepostedBy.ts index da59510e793..3c222f42ae1 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getRepostedBy.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getRepostedBy.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -27,7 +27,6 @@ export interface OutputSchema { cid?: string cursor?: string repostedBy: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts index b878f00e9c4..ccf2c4deb00 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/getTimeline.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/getTimeline.ts index 7eb11ed9637..ffd1908845e 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/getTimeline.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/getTimeline.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/like.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/like.ts index 118a1606100..8ced2a820c4 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/like.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/like.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.feed.like' export interface Record { + $type?: 'app.bsky.feed.like' | 'app.bsky.feed.like#main' subject: ComAtprotoRepoStrongRef.Main createdAt: string [k: string]: unknown diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/post.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/post.ts index b63e9ae63dd..2a96858ccc3 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/post.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/post.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyRichtextFacet from '../richtext/facet' import * as AppBskyEmbedImages from '../embed/images' import * as AppBskyEmbedVideo from '../embed/video' @@ -17,6 +17,7 @@ import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.feed.post' export interface Record { + $type?: 'app.bsky.feed.post' | 'app.bsky.feed.post#main' /** The primary post content. May be an empty string, if there are embeds. */ text: string /** DEPRECATED: replaced by app.bsky.richtext.facet. */ @@ -54,9 +55,9 @@ export function validateRecord(v: unknown) { } export interface ReplyRef { + $type?: 'app.bsky.feed.post#replyRef' root: ComAtprotoRepoStrongRef.Main parent: ComAtprotoRepoStrongRef.Main - [k: string]: unknown } export function isReplyRef( @@ -71,11 +72,11 @@ export function validateReplyRef(v: unknown) { /** 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 - [k: string]: unknown } export function isEntity( @@ -90,9 +91,9 @@ export function validateEntity(v: unknown) { /** 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 - [k: string]: unknown } export function isTextSlice( diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/postgate.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/postgate.ts index 659b5423b13..c1e135b4961 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/postgate.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/postgate.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.feed.postgate' export interface Record { + $type?: 'app.bsky.feed.postgate' | 'app.bsky.feed.postgate#main' createdAt: string /** Reference (AT-URI) to the post record. */ post: string @@ -30,7 +31,7 @@ export function validateRecord(v: unknown) { /** Disables embedding of this post. */ export interface DisableRule { - [k: string]: unknown + $type?: 'app.bsky.feed.postgate#disableRule' } export function isDisableRule(v: unknown): v is DisableRule & { diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/repost.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/repost.ts index baec71ae29b..3397c9db6e6 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/repost.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/repost.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.feed.repost' export interface Record { + $type?: 'app.bsky.feed.repost' | 'app.bsky.feed.repost#main' subject: ComAtprotoRepoStrongRef.Main createdAt: string [k: string]: unknown diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/searchPosts.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/searchPosts.ts index 9e8c6f2950c..e86fc686920 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/searchPosts.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/searchPosts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -44,7 +44,6 @@ export interface OutputSchema { /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ hitsTotal?: number posts: AppBskyFeedDefs.PostView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/sendInteractions.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/sendInteractions.ts index 793af1b716a..dc7fa7669ae 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/sendInteractions.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/sendInteractions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -15,12 +15,9 @@ export interface QueryParams {} export interface InputSchema { interactions: AppBskyFeedDefs.Interaction[] - [k: string]: unknown } -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export interface HandlerInput { encoding: 'application/json' diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/threadgate.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/threadgate.ts index cd424007087..1a776d4456a 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/threadgate.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/threadgate.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.feed.threadgate' export interface Record { + $type?: 'app.bsky.feed.threadgate' | 'app.bsky.feed.threadgate#main' /** Reference (AT-URI) to the post record. */ post: string allow?: ( @@ -35,7 +36,7 @@ export function validateRecord(v: unknown) { /** Allow replies from actors mentioned in your post. */ export interface MentionRule { - [k: string]: unknown + $type?: 'app.bsky.feed.threadgate#mentionRule' } export function isMentionRule(v: unknown): v is MentionRule & { @@ -53,7 +54,7 @@ export function validateMentionRule(v: unknown) { /** Allow replies from actors you follow. */ export interface FollowingRule { - [k: string]: unknown + $type?: 'app.bsky.feed.threadgate#followingRule' } export function isFollowingRule(v: unknown): v is FollowingRule & { @@ -71,8 +72,8 @@ export function validateFollowingRule(v: unknown) { /** Allow replies from actors on a list. */ export interface ListRule { + $type?: 'app.bsky.feed.threadgate#listRule' list: string - [k: string]: unknown } export function isListRule( diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/block.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/block.ts index 79f0c46305b..1575db8242f 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/block.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/block.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.graph.block' export interface Record { + $type?: 'app.bsky.graph.block' | 'app.bsky.graph.block#main' /** DID of the account to be blocked. */ subject: string createdAt: string diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/defs.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/defs.ts index 4f2e53f6c5f..d7b85120a8c 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/defs.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' import * as AppBskyActorDefs from '../actor/defs' import * as AppBskyRichtextFacet from '../richtext/facet' @@ -13,6 +13,7 @@ import * as AppBskyFeedDefs from '../feed/defs' export const id = 'app.bsky.graph.defs' export interface ListViewBasic { + $type?: 'app.bsky.graph.defs#listViewBasic' uri: string cid: string name: string @@ -22,7 +23,6 @@ export interface ListViewBasic { labels?: ComAtprotoLabelDefs.Label[] viewer?: ListViewerState indexedAt?: string - [k: string]: unknown } export function isListViewBasic(v: unknown): v is ListViewBasic & { @@ -39,6 +39,7 @@ export function validateListViewBasic(v: unknown) { } export interface ListView { + $type?: 'app.bsky.graph.defs#listView' uri: string cid: string creator: AppBskyActorDefs.ProfileView @@ -51,7 +52,6 @@ export interface ListView { labels?: ComAtprotoLabelDefs.Label[] viewer?: ListViewerState indexedAt: string - [k: string]: unknown } export function isListView( @@ -65,9 +65,9 @@ export function validateListView(v: unknown) { } export interface ListItemView { + $type?: 'app.bsky.graph.defs#listItemView' uri: string subject: AppBskyActorDefs.ProfileView - [k: string]: unknown } export function isListItemView( @@ -84,9 +84,10 @@ export function validateListItemView(v: unknown) { } export interface StarterPackView { + $type?: 'app.bsky.graph.defs#starterPackView' uri: string cid: string - record: {} + record: { [_ in string]: unknown } creator: AppBskyActorDefs.ProfileViewBasic list?: ListViewBasic listItemsSample?: ListItemView[] @@ -95,7 +96,6 @@ export interface StarterPackView { joinedAllTimeCount?: number labels?: ComAtprotoLabelDefs.Label[] indexedAt: string - [k: string]: unknown } export function isStarterPackView(v: unknown): v is StarterPackView & { @@ -112,16 +112,16 @@ export function validateStarterPackView(v: unknown) { } export interface StarterPackViewBasic { + $type?: 'app.bsky.graph.defs#starterPackViewBasic' uri: string cid: string - record: {} + record: { [_ in string]: unknown } creator: AppBskyActorDefs.ProfileViewBasic listItemCount?: number joinedWeekCount?: number joinedAllTimeCount?: number labels?: ComAtprotoLabelDefs.Label[] indexedAt: string - [k: string]: unknown } export function isStarterPackViewBasic( @@ -153,9 +153,9 @@ export const CURATELIST = 'app.bsky.graph.defs#curatelist' export const REFERENCELIST = 'app.bsky.graph.defs#referencelist' export interface ListViewerState { + $type?: 'app.bsky.graph.defs#listViewerState' muted?: boolean blocked?: string - [k: string]: unknown } export function isListViewerState(v: unknown): v is ListViewerState & { @@ -173,9 +173,9 @@ export function validateListViewerState(v: unknown) { /** indicates that a handle or DID could not be resolved */ export interface NotFoundActor { + $type?: 'app.bsky.graph.defs#notFoundActor' actor: string notFound: true - [k: string]: unknown } export function isNotFoundActor(v: unknown): v is NotFoundActor & { @@ -193,12 +193,12 @@ export function validateNotFoundActor(v: unknown) { /** 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 - [k: string]: unknown } export function isRelationship( diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/follow.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/follow.ts index 7da79cb6f6d..97da4da5437 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/follow.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/follow.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.graph.follow' export interface Record { + $type?: 'app.bsky.graph.follow' | 'app.bsky.graph.follow#main' subject: string createdAt: string [k: string]: unknown diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts index b43fa3f0e67..edae888075b 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string starterPacks: AppBskyGraphDefs.StarterPackViewBasic[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getBlocks.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getBlocks.ts index 97002ce1352..208512babca 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getBlocks.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getBlocks.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string blocks: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getFollowers.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getFollowers.ts index cbc561800b4..0004ccee43d 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getFollowers.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getFollowers.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -23,7 +23,6 @@ export interface OutputSchema { subject: AppBskyActorDefs.ProfileView cursor?: string followers: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getFollows.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getFollows.ts index 993a8fa5219..b41e25b6952 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getFollows.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getFollows.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -23,7 +23,6 @@ export interface OutputSchema { subject: AppBskyActorDefs.ProfileView cursor?: string follows: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts index 125939471e5..a225bd1ab34 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -23,7 +23,6 @@ export interface OutputSchema { subject: AppBskyActorDefs.ProfileView cursor?: string followers: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getList.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getList.ts index 1bbd4682300..5dba8af7234 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getList.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getList.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -24,7 +24,6 @@ export interface OutputSchema { cursor?: string list: AppBskyGraphDefs.ListView items: AppBskyGraphDefs.ListItemView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getListBlocks.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getListBlocks.ts index 4db65c33f29..efe19f9d420 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getListBlocks.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getListBlocks.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string lists: AppBskyGraphDefs.ListView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getListMutes.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getListMutes.ts index 59c1b6fe073..fee69ac07b8 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getListMutes.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getListMutes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string lists: AppBskyGraphDefs.ListView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getLists.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getLists.ts index 1b343188801..22db439e198 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getLists.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getLists.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string lists: AppBskyGraphDefs.ListView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getMutes.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getMutes.ts index d3d85056d5e..74921f90b0b 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getMutes.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getMutes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string mutes: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getRelationships.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getRelationships.ts index 1349f8a5bbf..eed1299cb69 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getRelationships.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getRelationships.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -27,7 +27,6 @@ export interface OutputSchema { | AppBskyGraphDefs.NotFoundActor | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getStarterPack.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getStarterPack.ts index 741176f0773..81bf23e8620 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getStarterPack.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getStarterPack.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { starterPack: AppBskyGraphDefs.StarterPackView - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getStarterPacks.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getStarterPacks.ts index 595ea704853..64e3cac88c2 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getStarterPacks.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getStarterPacks.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { starterPacks: AppBskyGraphDefs.StarterPackViewBasic[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts index 9aca4fc8c44..456997eba45 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -21,7 +21,6 @@ export interface OutputSchema { suggestions: AppBskyActorDefs.ProfileView[] /** If true, response has fallen-back to generic results, and is not scoped using relativeToDid */ isFallback?: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/list.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/list.ts index 4a5af8012f7..f00aaa02f5a 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/list.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/list.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyGraphDefs from './defs' import * as AppBskyRichtextFacet from '../richtext/facet' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' @@ -12,6 +12,7 @@ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.graph.list' export interface Record { + $type?: 'app.bsky.graph.list' | 'app.bsky.graph.list#main' purpose: AppBskyGraphDefs.ListPurpose /** Display name for list; can not be empty. */ name: string diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/listblock.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/listblock.ts index a1699eba67a..713cbba4269 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/listblock.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/listblock.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.graph.listblock' export interface Record { + $type?: 'app.bsky.graph.listblock' | 'app.bsky.graph.listblock#main' /** Reference (AT-URI) to the mod list record. */ subject: string createdAt: string diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/listitem.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/listitem.ts index 9be8287ce0e..08e8e4f5543 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/listitem.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/listitem.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.graph.listitem' export interface Record { + $type?: 'app.bsky.graph.listitem' | 'app.bsky.graph.listitem#main' /** The account which is included on the list. */ subject: string /** Reference (AT-URI) to the list record (app.bsky.graph.list). */ diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/muteActor.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/muteActor.ts index 302c7d4879a..92af6cda1d2 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/muteActor.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/muteActor.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.muteActor' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { actor: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/muteActorList.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/muteActorList.ts index 7e1d9d7e727..24abc1eaa8b 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/muteActorList.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/muteActorList.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.muteActorList' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { list: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/muteThread.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/muteThread.ts index 97b2937fb39..3bad99cbdbb 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/muteThread.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/muteThread.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.muteThread' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { root: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/starterpack.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/starterpack.ts index 0bfcb427ed3..5cb2a2e1c26 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/starterpack.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/starterpack.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyRichtextFacet from '../richtext/facet' export const id = 'app.bsky.graph.starterpack' export interface Record { + $type?: 'app.bsky.graph.starterpack' | 'app.bsky.graph.starterpack#main' /** Display name for starter pack; can not be empty. */ name: string description?: string @@ -32,8 +33,8 @@ export function validateRecord(v: unknown) { } export interface FeedItem { + $type?: 'app.bsky.graph.starterpack#feedItem' uri: string - [k: string]: unknown } export function isFeedItem( diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/unmuteActor.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/unmuteActor.ts index 77bb88083da..2d9feb63f5c 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/unmuteActor.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/unmuteActor.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.unmuteActor' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { actor: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/unmuteActorList.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/unmuteActorList.ts index 04a03b76764..583b5a38daa 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/unmuteActorList.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/unmuteActorList.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.unmuteActorList' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { list: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/app/bsky/graph/unmuteThread.ts b/packages/bsky/src/lexicon/types/app/bsky/graph/unmuteThread.ts index 90e9234cda5..fce07aaa3e9 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/graph/unmuteThread.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/graph/unmuteThread.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.unmuteThread' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { root: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/app/bsky/labeler/defs.ts b/packages/bsky/src/lexicon/types/app/bsky/labeler/defs.ts index 02973fb6b9e..83ac570a432 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/labeler/defs.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/labeler/defs.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyActorDefs from '../actor/defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.labeler.defs' export interface LabelerView { + $type?: 'app.bsky.labeler.defs#labelerView' uri: string cid: string creator: AppBskyActorDefs.ProfileView @@ -18,7 +19,6 @@ export interface LabelerView { viewer?: LabelerViewerState indexedAt: string labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isLabelerView( @@ -35,6 +35,7 @@ export function validateLabelerView(v: unknown) { } export interface LabelerViewDetailed { + $type?: 'app.bsky.labeler.defs#labelerViewDetailed' uri: string cid: string creator: AppBskyActorDefs.ProfileView @@ -43,7 +44,6 @@ export interface LabelerViewDetailed { viewer?: LabelerViewerState indexedAt: string labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isLabelerViewDetailed(v: unknown): v is LabelerViewDetailed & { @@ -60,8 +60,8 @@ export function validateLabelerViewDetailed(v: unknown) { } export interface LabelerViewerState { + $type?: 'app.bsky.labeler.defs#labelerViewerState' like?: string - [k: string]: unknown } export function isLabelerViewerState(v: unknown): v is LabelerViewerState & { @@ -78,11 +78,11 @@ export function validateLabelerViewerState(v: unknown) { } 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[] - [k: string]: unknown } export function isLabelerPolicies(v: unknown): v is LabelerPolicies & { diff --git a/packages/bsky/src/lexicon/types/app/bsky/labeler/getServices.ts b/packages/bsky/src/lexicon/types/app/bsky/labeler/getServices.ts index dcc29c5f73f..aca7c6c61d3 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/labeler/getServices.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/labeler/getServices.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyLabelerDefs from './defs' @@ -24,7 +24,6 @@ export interface OutputSchema { | AppBskyLabelerDefs.LabelerViewDetailed | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/labeler/service.ts b/packages/bsky/src/lexicon/types/app/bsky/labeler/service.ts index 8b91f65c304..82324693664 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/labeler/service.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/labeler/service.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyLabelerDefs from './defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.labeler.service' export interface Record { + $type?: 'app.bsky.labeler.service' | 'app.bsky.labeler.service#main' policies: AppBskyLabelerDefs.LabelerPolicies labels?: | ComAtprotoLabelDefs.SelfLabels diff --git a/packages/bsky/src/lexicon/types/app/bsky/notification/getUnreadCount.ts b/packages/bsky/src/lexicon/types/app/bsky/notification/getUnreadCount.ts index 37eac1bd1f1..9f3992a91c8 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/notification/getUnreadCount.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/notification/getUnreadCount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.notification.getUnreadCount' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { count: number - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/notification/listNotifications.ts b/packages/bsky/src/lexicon/types/app/bsky/notification/listNotifications.ts index d4b68653ca5..0d8c35658af 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/notification/listNotifications.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/notification/listNotifications.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' @@ -26,7 +26,6 @@ export interface OutputSchema { notifications: Notification[] priority?: boolean seenAt?: string - [k: string]: unknown } export type HandlerInput = undefined @@ -55,6 +54,7 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Notification { + $type?: 'app.bsky.notification.listNotifications#notification' uri: string cid: string author: AppBskyActorDefs.ProfileView @@ -69,11 +69,10 @@ export interface Notification { | 'starterpack-joined' | (string & {}) reasonSubject?: string - record: {} + record: { [_ in string]: unknown } isRead: boolean indexedAt: string labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isNotification(v: unknown): v is Notification & { diff --git a/packages/bsky/src/lexicon/types/app/bsky/notification/putPreferences.ts b/packages/bsky/src/lexicon/types/app/bsky/notification/putPreferences.ts index ad2f6aa4226..5ff2b706722 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/notification/putPreferences.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/notification/putPreferences.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.notification.putPreferences' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { priority: boolean - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/app/bsky/notification/registerPush.ts b/packages/bsky/src/lexicon/types/app/bsky/notification/registerPush.ts index 3ffdf1b7b4f..7c7de7e2450 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/notification/registerPush.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/notification/registerPush.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.notification.registerPush' @@ -17,7 +17,6 @@ export interface InputSchema { token: string platform: 'ios' | 'android' | 'web' | (string & {}) appId: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/app/bsky/notification/updateSeen.ts b/packages/bsky/src/lexicon/types/app/bsky/notification/updateSeen.ts index 1fbd2fe680c..f600ba2b573 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/notification/updateSeen.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/notification/updateSeen.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.notification.updateSeen' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { seenAt: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/app/bsky/richtext/facet.ts b/packages/bsky/src/lexicon/types/app/bsky/richtext/facet.ts index 339f2fa2739..2fc31719525 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/richtext/facet.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/richtext/facet.ts @@ -4,15 +4,15 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.richtext.facet' /** Annotation of a sub-string within rich text. */ export interface Main { + $type?: 'app.bsky.richtext.facet' | 'app.bsky.richtext.facet#main' index: ByteSlice features: (Mention | Link | Tag | { $type: string; [k: string]: unknown })[] - [k: string]: unknown } export function isMain( @@ -27,8 +27,8 @@ export function validateMain(v: unknown) { /** 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 - [k: string]: unknown } export function isMention( @@ -43,8 +43,8 @@ export function validateMention(v: unknown) { /** 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 - [k: string]: unknown } export function isLink( @@ -59,8 +59,8 @@ export function validateLink(v: unknown) { /** 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 - [k: string]: unknown } export function isTag( @@ -75,9 +75,9 @@ export function validateTag(v: unknown) { /** 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 - [k: string]: unknown } export function isByteSlice( diff --git a/packages/bsky/src/lexicon/types/app/bsky/unspecced/defs.ts b/packages/bsky/src/lexicon/types/app/bsky/unspecced/defs.ts index f6fb3ac74d4..c5cde2205f4 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/unspecced/defs.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/unspecced/defs.ts @@ -4,13 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.unspecced.defs' export interface SkeletonSearchPost { + $type?: 'app.bsky.unspecced.defs#skeletonSearchPost' uri: string - [k: string]: unknown } export function isSkeletonSearchPost(v: unknown): v is SkeletonSearchPost & { @@ -27,8 +27,8 @@ export function validateSkeletonSearchPost(v: unknown) { } export interface SkeletonSearchActor { + $type?: 'app.bsky.unspecced.defs#skeletonSearchActor' did: string - [k: string]: unknown } export function isSkeletonSearchActor(v: unknown): v is SkeletonSearchActor & { diff --git a/packages/bsky/src/lexicon/types/app/bsky/unspecced/getConfig.ts b/packages/bsky/src/lexicon/types/app/bsky/unspecced/getConfig.ts index 78dbbe4e854..17459f72b3c 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/unspecced/getConfig.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/unspecced/getConfig.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.unspecced.getConfig' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { checkEmailConfirmed?: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts b/packages/bsky/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts index 07b21eb7514..cfcebf099bf 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from '../feed/defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts b/packages/bsky/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts index adae4cbe67a..33ee7b00cbe 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyUnspeccedDefs from './defs' @@ -27,7 +27,6 @@ export interface OutputSchema { 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 - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts b/packages/bsky/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts index b7f9be1a008..9afa5d4d5f5 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.unspecced.getTaggedSuggestions' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { suggestions: Suggestion[] - [k: string]: unknown } export type HandlerInput = undefined @@ -45,10 +44,10 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Suggestion { + $type?: 'app.bsky.unspecced.getTaggedSuggestions#suggestion' tag: string subjectType: 'actor' | 'feed' | (string & {}) subject: string - [k: string]: unknown } export function isSuggestion(v: unknown): v is Suggestion & { diff --git a/packages/bsky/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts b/packages/bsky/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts index 9187623dab8..98eaccf12d7 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyUnspeccedDefs from './defs' @@ -30,7 +30,6 @@ export interface OutputSchema { /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ hitsTotal?: number actors: AppBskyUnspeccedDefs.SkeletonSearchActor[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts b/packages/bsky/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts index f0c33731dfe..41425088a3d 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyUnspeccedDefs from './defs' @@ -46,7 +46,6 @@ export interface OutputSchema { /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ hitsTotal?: number posts: AppBskyUnspeccedDefs.SkeletonSearchPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/video/defs.ts b/packages/bsky/src/lexicon/types/app/bsky/video/defs.ts index 3a709ce65ad..9c94df560db 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/video/defs.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/video/defs.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export 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. */ @@ -18,7 +19,6 @@ export interface JobStatus { blob?: BlobRef error?: string message?: string - [k: string]: unknown } export function isJobStatus( diff --git a/packages/bsky/src/lexicon/types/app/bsky/video/getJobStatus.ts b/packages/bsky/src/lexicon/types/app/bsky/video/getJobStatus.ts index f2479a16d50..b42395ca1e2 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/video/getJobStatus.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/video/getJobStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyVideoDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { jobStatus: AppBskyVideoDefs.JobStatus - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/video/getUploadLimits.ts b/packages/bsky/src/lexicon/types/app/bsky/video/getUploadLimits.ts index cf280f19737..84faac95ab5 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/video/getUploadLimits.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/video/getUploadLimits.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.video.getUploadLimits' @@ -20,7 +20,6 @@ export interface OutputSchema { remainingDailyBytes?: number message?: string error?: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/app/bsky/video/uploadVideo.ts b/packages/bsky/src/lexicon/types/app/bsky/video/uploadVideo.ts index 8de7d0595fe..8900d9f285a 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/video/uploadVideo.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/video/uploadVideo.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyVideoDefs from './defs' @@ -18,7 +18,6 @@ export type InputSchema = string | Uint8Array | Blob export interface OutputSchema { jobStatus: AppBskyVideoDefs.JobStatus - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/chat/bsky/actor/declaration.ts b/packages/bsky/src/lexicon/types/chat/bsky/actor/declaration.ts index 7314ce3f777..8728c035dce 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/actor/declaration.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/actor/declaration.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'chat.bsky.actor.declaration' export interface Record { + $type?: 'chat.bsky.actor.declaration' | 'chat.bsky.actor.declaration#main' allowIncoming: 'all' | 'none' | 'following' | (string & {}) [k: string]: unknown } diff --git a/packages/bsky/src/lexicon/types/chat/bsky/actor/defs.ts b/packages/bsky/src/lexicon/types/chat/bsky/actor/defs.ts index e53389afa10..7127a0c2061 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/actor/defs.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/actor/defs.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyActorDefs from '../../../app/bsky/actor/defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'chat.bsky.actor.defs' export interface ProfileViewBasic { + $type?: 'chat.bsky.actor.defs#profileViewBasic' did: string handle: string displayName?: string @@ -20,7 +21,6 @@ export interface ProfileViewBasic { labels?: ComAtprotoLabelDefs.Label[] /** Set to true when the actor cannot actively participate in converations */ chatDisabled?: boolean - [k: string]: unknown } export function isProfileViewBasic(v: unknown): v is ProfileViewBasic & { diff --git a/packages/bsky/src/lexicon/types/chat/bsky/actor/deleteAccount.ts b/packages/bsky/src/lexicon/types/chat/bsky/actor/deleteAccount.ts index 23e9e3572bf..fe776d7c8bf 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/actor/deleteAccount.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/actor/deleteAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.actor.deleteAccount' @@ -14,9 +14,7 @@ export interface QueryParams {} export type InputSchema = undefined -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/chat/bsky/actor/exportAccountData.ts b/packages/bsky/src/lexicon/types/chat/bsky/actor/exportAccountData.ts index 44aa74540b1..ce29bfcefcb 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/actor/exportAccountData.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/actor/exportAccountData.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.actor.exportAccountData' diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/defs.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/defs.ts index 29da4f1ed94..4ccc43f11e5 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/defs.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyRichtextFacet from '../../../app/bsky/richtext/facet' import * as AppBskyEmbedRecord from '../../../app/bsky/embed/record' import * as ChatBskyActorDefs from '../actor/defs' @@ -12,10 +12,10 @@ import * as ChatBskyActorDefs from '../actor/defs' export const id = 'chat.bsky.convo.defs' export interface MessageRef { + $type?: 'chat.bsky.convo.defs#messageRef' did: string convoId: string messageId: string - [k: string]: unknown } export function isMessageRef( @@ -32,11 +32,11 @@ export function validateMessageRef(v: unknown) { } export interface MessageInput { + $type?: 'chat.bsky.convo.defs#messageInput' text: string /** Annotations of text (mentions, URLs, hashtags, etc) */ facets?: AppBskyRichtextFacet.Main[] embed?: AppBskyEmbedRecord.Main | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isMessageInput(v: unknown): v is MessageInput & { @@ -53,6 +53,7 @@ export function validateMessageInput(v: unknown) { } export interface MessageView { + $type?: 'chat.bsky.convo.defs#messageView' id: string rev: string text: string @@ -61,7 +62,6 @@ export interface MessageView { embed?: AppBskyEmbedRecord.View | { $type: string; [k: string]: unknown } sender: MessageViewSender sentAt: string - [k: string]: unknown } export function isMessageView( @@ -78,11 +78,11 @@ export function validateMessageView(v: unknown) { } export interface DeletedMessageView { + $type?: 'chat.bsky.convo.defs#deletedMessageView' id: string rev: string sender: MessageViewSender sentAt: string - [k: string]: unknown } export function isDeletedMessageView(v: unknown): v is DeletedMessageView & { @@ -99,8 +99,8 @@ export function validateDeletedMessageView(v: unknown) { } export interface MessageViewSender { + $type?: 'chat.bsky.convo.defs#messageViewSender' did: string - [k: string]: unknown } export function isMessageViewSender(v: unknown): v is MessageViewSender & { @@ -117,6 +117,7 @@ export function validateMessageViewSender(v: unknown) { } export interface ConvoView { + $type?: 'chat.bsky.convo.defs#convoView' id: string rev: string members: ChatBskyActorDefs.ProfileViewBasic[] @@ -127,7 +128,6 @@ export interface ConvoView { muted: boolean opened?: boolean unreadCount: number - [k: string]: unknown } export function isConvoView( @@ -141,9 +141,9 @@ export function validateConvoView(v: unknown) { } export interface LogBeginConvo { + $type?: 'chat.bsky.convo.defs#logBeginConvo' rev: string convoId: string - [k: string]: unknown } export function isLogBeginConvo(v: unknown): v is LogBeginConvo & { @@ -160,9 +160,9 @@ export function validateLogBeginConvo(v: unknown) { } export interface LogLeaveConvo { + $type?: 'chat.bsky.convo.defs#logLeaveConvo' rev: string convoId: string - [k: string]: unknown } export function isLogLeaveConvo(v: unknown): v is LogLeaveConvo & { @@ -179,13 +179,13 @@ export function validateLogLeaveConvo(v: unknown) { } export interface LogCreateMessage { + $type?: 'chat.bsky.convo.defs#logCreateMessage' rev: string convoId: string message: | MessageView | DeletedMessageView | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isLogCreateMessage(v: unknown): v is LogCreateMessage & { @@ -202,13 +202,13 @@ export function validateLogCreateMessage(v: unknown) { } export interface LogDeleteMessage { + $type?: 'chat.bsky.convo.defs#logDeleteMessage' rev: string convoId: string message: | MessageView | DeletedMessageView | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isLogDeleteMessage(v: unknown): v is LogDeleteMessage & { diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts index 3097dda17b7..29dca72f0d8 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -16,7 +16,6 @@ export interface QueryParams {} export interface InputSchema { convoId: string messageId: string - [k: string]: unknown } export type OutputSchema = ChatBskyConvoDefs.DeletedMessageView diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/getConvo.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/getConvo.ts index a0da707e4e3..62748ac8f5e 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/getConvo.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/getConvo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts index 3037df3634e..1dd9bf51e12 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/getLog.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/getLog.ts index e9e46c404f6..a3608e9b4bb 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/getLog.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/getLog.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -26,7 +26,6 @@ export interface OutputSchema { | ChatBskyConvoDefs.LogDeleteMessage | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/getMessages.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/getMessages.ts index a52f1e6273a..2c82e079299 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/getMessages.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/getMessages.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -26,7 +26,6 @@ export interface OutputSchema { | ChatBskyConvoDefs.DeletedMessageView | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/leaveConvo.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/leaveConvo.ts index 35b3789c53d..5d3caeb971b 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/leaveConvo.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/leaveConvo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.convo.leaveConvo' @@ -14,13 +14,11 @@ export interface QueryParams {} export interface InputSchema { convoId: string - [k: string]: unknown } export interface OutputSchema { convoId: string rev: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/listConvos.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/listConvos.ts index 29686f9e22e..218ac63024d 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/listConvos.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/listConvos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string convos: ChatBskyConvoDefs.ConvoView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/muteConvo.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/muteConvo.ts index 9259e02d05e..2cd58fb188c 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/muteConvo.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/muteConvo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { convoId: string - [k: string]: unknown } export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/sendMessage.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/sendMessage.ts index 220d415fc86..703bf2eb67e 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/sendMessage.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/sendMessage.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -16,7 +16,6 @@ export interface QueryParams {} export interface InputSchema { convoId: string message: ChatBskyConvoDefs.MessageInput - [k: string]: unknown } export type OutputSchema = ChatBskyConvoDefs.MessageView diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts index 78b65e9218b..c1efbff74b3 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { items: BatchItem[] - [k: string]: unknown } export interface OutputSchema { items: ChatBskyConvoDefs.MessageView[] - [k: string]: unknown } export interface HandlerInput { @@ -52,9 +50,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface BatchItem { + $type?: 'chat.bsky.convo.sendMessageBatch#batchItem' convoId: string message: ChatBskyConvoDefs.MessageInput - [k: string]: unknown } export function isBatchItem(v: unknown): v is BatchItem & { diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts index c27b96de1d6..ad8108d63b4 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { convoId: string - [k: string]: unknown } export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/chat/bsky/convo/updateRead.ts b/packages/bsky/src/lexicon/types/chat/bsky/convo/updateRead.ts index ff79b5b9b57..b505ff08c30 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/convo/updateRead.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/convo/updateRead.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -16,12 +16,10 @@ export interface QueryParams {} export interface InputSchema { convoId: string messageId?: string - [k: string]: unknown } export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts b/packages/bsky/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts index 50e3605a964..29872766060 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.moderation.getActorMetadata' @@ -20,7 +20,6 @@ export interface OutputSchema { day: Metadata month: Metadata all: Metadata - [k: string]: unknown } export type HandlerInput = undefined @@ -49,11 +48,11 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Metadata { + $type?: 'chat.bsky.moderation.getActorMetadata#metadata' messagesSent: number messagesReceived: number convos: number convosStarted: number - [k: string]: unknown } export function isMetadata(v: unknown): v is Metadata & { diff --git a/packages/bsky/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts b/packages/bsky/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts index 127d408e0fa..71de12b77aa 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from '../convo/defs' @@ -27,7 +27,6 @@ export interface OutputSchema { | ChatBskyConvoDefs.DeletedMessageView | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts b/packages/bsky/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts index 355c7968ff1..feef56ddb2d 100644 --- a/packages/bsky/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts +++ b/packages/bsky/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.moderation.updateActorAccess' @@ -16,7 +16,6 @@ export interface InputSchema { actor: string allowAccess: boolean ref?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/defs.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/defs.ts index e9e29643b81..e43ce333edf 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/defs.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/defs.ts @@ -4,15 +4,15 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoServerDefs from '../server/defs' export const id = 'com.atproto.admin.defs' export interface StatusAttr { + $type?: 'com.atproto.admin.defs#statusAttr' applied: boolean ref?: string - [k: string]: unknown } export function isStatusAttr( @@ -29,10 +29,11 @@ export function validateStatusAttr(v: unknown) { } export interface AccountView { + $type?: 'com.atproto.admin.defs#accountView' did: string handle: string email?: string - relatedRecords?: {}[] + relatedRecords?: { [_ in string]: unknown }[] indexedAt: string invitedBy?: ComAtprotoServerDefs.InviteCode invites?: ComAtprotoServerDefs.InviteCode[] @@ -41,7 +42,6 @@ export interface AccountView { inviteNote?: string deactivatedAt?: string threatSignatures?: ThreatSignature[] - [k: string]: unknown } export function isAccountView(v: unknown): v is AccountView & { @@ -58,8 +58,8 @@ export function validateAccountView(v: unknown) { } export interface RepoRef { + $type?: 'com.atproto.admin.defs#repoRef' did: string - [k: string]: unknown } export function isRepoRef( @@ -73,10 +73,10 @@ export function validateRepoRef(v: unknown) { } export interface RepoBlobRef { + $type?: 'com.atproto.admin.defs#repoBlobRef' did: string cid: string recordUri?: string - [k: string]: unknown } export function isRepoBlobRef(v: unknown): v is RepoBlobRef & { @@ -93,9 +93,9 @@ export function validateRepoBlobRef(v: unknown) { } export interface ThreatSignature { + $type?: 'com.atproto.admin.defs#threatSignature' property: string value: string - [k: string]: unknown } export function isThreatSignature(v: unknown): v is ThreatSignature & { diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/deleteAccount.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/deleteAccount.ts index 10c10e11479..b89f7b3ef7b 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/deleteAccount.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/deleteAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.deleteAccount' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { did: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts index 4f32510bcc4..7e6489f0bfc 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.disableAccountInvites' @@ -16,7 +16,6 @@ export interface InputSchema { account: string /** Optional reason for disabled invites. */ note?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts index 8a0033e90a1..e1a77bf44b9 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.disableInviteCodes' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { codes?: string[] accounts?: string[] - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts index dc96903fcfc..dbf8968efb6 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.enableAccountInvites' @@ -16,7 +16,6 @@ export interface InputSchema { account: string /** Optional reason for enabled invites. */ note?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/getAccountInfo.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/getAccountInfo.ts index 9c4eab14e8f..dec940a0b05 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/getAccountInfo.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/getAccountInfo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/getAccountInfos.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/getAccountInfos.ts index d979bd557d5..c0fc90e9cd1 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/getAccountInfos.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/getAccountInfos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { infos: ComAtprotoAdminDefs.AccountView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/getInviteCodes.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/getInviteCodes.ts index a39c85de445..80a29cd38a7 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/getInviteCodes.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/getInviteCodes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoServerDefs from '../server/defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string codes: ComAtprotoServerDefs.InviteCode[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts index 517e9789a2f..4397af13aca 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' import * as ComAtprotoRepoStrongRef from '../repo/strongRef' @@ -28,7 +28,6 @@ export interface OutputSchema { | { $type: string; [k: string]: unknown } takedown?: ComAtprotoAdminDefs.StatusAttr deactivated?: ComAtprotoAdminDefs.StatusAttr - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/searchAccounts.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/searchAccounts.ts index 91ff4cbc93f..096bbed018b 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/searchAccounts.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/searchAccounts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string accounts: ComAtprotoAdminDefs.AccountView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/sendEmail.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/sendEmail.ts index b6072bce155..6189455fa53 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/sendEmail.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/sendEmail.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.sendEmail' @@ -19,12 +19,10 @@ export interface InputSchema { 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 - [k: string]: unknown } export interface OutputSchema { sent: boolean - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts index 2dd68717296..4a08416a98c 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.updateAccountEmail' @@ -16,7 +16,6 @@ export interface InputSchema { /** The handle or DID of the repo. */ account: string email: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts index 95cde6f8d48..33e1198fcf4 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.updateAccountHandle' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { did: string handle: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts index ba1ef25f620..5d7dc1233ba 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.updateAccountPassword' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { did: string password: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts index ccd44f528cf..63f078b2320 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' import * as ComAtprotoRepoStrongRef from '../repo/strongRef' @@ -22,7 +22,6 @@ export interface InputSchema { | { $type: string; [k: string]: unknown } takedown?: ComAtprotoAdminDefs.StatusAttr deactivated?: ComAtprotoAdminDefs.StatusAttr - [k: string]: unknown } export interface OutputSchema { @@ -32,7 +31,6 @@ export interface OutputSchema { | ComAtprotoAdminDefs.RepoBlobRef | { $type: string; [k: string]: unknown } takedown?: ComAtprotoAdminDefs.StatusAttr - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts b/packages/bsky/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts index d3926404ffe..8a2bee49e07 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.getRecommendedDidCredentials' @@ -18,9 +18,8 @@ export interface OutputSchema { /** Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs. */ rotationKeys?: string[] alsoKnownAs?: string[] - verificationMethods?: {} - services?: {} - [k: string]: unknown + verificationMethods?: { [_ in string]: unknown } + services?: { [_ in string]: unknown } } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts b/packages/bsky/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts index cfe024ea3bd..d1cb7b2e70f 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.requestPlcOperationSignature' diff --git a/packages/bsky/src/lexicon/types/com/atproto/identity/resolveHandle.ts b/packages/bsky/src/lexicon/types/com/atproto/identity/resolveHandle.ts index 3d3accc304e..73872b1d714 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/identity/resolveHandle.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/identity/resolveHandle.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.resolveHandle' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { did: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/identity/signPlcOperation.ts b/packages/bsky/src/lexicon/types/com/atproto/identity/signPlcOperation.ts index 4972bf51d53..df44d2b2f28 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/identity/signPlcOperation.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/identity/signPlcOperation.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.signPlcOperation' @@ -17,15 +17,13 @@ export interface InputSchema { token?: string rotationKeys?: string[] alsoKnownAs?: string[] - verificationMethods?: {} - services?: {} - [k: string]: unknown + verificationMethods?: { [_ in string]: unknown } + services?: { [_ in string]: unknown } } export interface OutputSchema { /** A signed DID PLC operation. */ - operation: {} - [k: string]: unknown + operation: { [_ in string]: unknown } } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts b/packages/bsky/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts index 5c24a9ebe33..82a0b96c67f 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.submitPlcOperation' @@ -13,8 +13,7 @@ export const id = 'com.atproto.identity.submitPlcOperation' export interface QueryParams {} export interface InputSchema { - operation: {} - [k: string]: unknown + operation: { [_ in string]: unknown } } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/identity/updateHandle.ts b/packages/bsky/src/lexicon/types/com/atproto/identity/updateHandle.ts index e34ab1caa01..069b1bcb2ae 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/identity/updateHandle.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/identity/updateHandle.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.updateHandle' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { /** The new handle. */ handle: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/label/defs.ts b/packages/bsky/src/lexicon/types/com/atproto/label/defs.ts index b51ef88d7c2..26114bf4897 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/label/defs.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/label/defs.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export 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. */ @@ -28,7 +29,6 @@ export interface Label { exp?: string /** Signature of dag-cbor encoded label. */ sig?: Uint8Array - [k: string]: unknown } export function isLabel( @@ -43,8 +43,8 @@ export function validateLabel(v: unknown) { /** Metadata tags on an atproto record, published by the author within the record. */ export interface SelfLabels { + $type?: 'com.atproto.label.defs#selfLabels' values: SelfLabel[] - [k: string]: unknown } export function isSelfLabels( @@ -62,9 +62,9 @@ export function validateSelfLabels(v: unknown) { /** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. */ export interface SelfLabel { + $type?: 'com.atproto.label.defs#selfLabel' /** The short string name of the value or type of this label. */ val: string - [k: string]: unknown } export function isSelfLabel( @@ -79,6 +79,7 @@ export function validateSelfLabel(v: unknown) { /** Declares a label value and its expected interpretations and behaviors. */ export interface LabelValueDefinition { + $type?: 'com.atproto.label.defs#labelValueDefinition' /** The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). */ identifier: string /** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. */ @@ -90,7 +91,6 @@ export interface LabelValueDefinition { /** Does the user need to have adult content enabled in order to configure this label? */ adultOnly?: boolean locales: LabelValueDefinitionStrings[] - [k: string]: unknown } export function isLabelValueDefinition( @@ -110,13 +110,13 @@ export function validateLabelValueDefinition(v: unknown) { /** Strings which describe the label in the UI, localized into a specific language. */ export interface LabelValueDefinitionStrings { + $type?: 'com.atproto.label.defs#labelValueDefinitionStrings' /** The code of the language these strings are written in. */ lang: string /** A short human-readable name for the label. */ name: string /** A longer description of what the label means and why it might be applied. */ description: string - [k: string]: unknown } export function isLabelValueDefinitionStrings( diff --git a/packages/bsky/src/lexicon/types/com/atproto/label/queryLabels.ts b/packages/bsky/src/lexicon/types/com/atproto/label/queryLabels.ts index e8d05b18ad3..11d46b522cb 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/label/queryLabels.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/label/queryLabels.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoLabelDefs from './defs' @@ -25,7 +25,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string labels: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/label/subscribeLabels.ts b/packages/bsky/src/lexicon/types/com/atproto/label/subscribeLabels.ts index 71d05b72c3c..a6757ad54df 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/label/subscribeLabels.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/label/subscribeLabels.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, ErrorFrame } from '@atproto/xrpc-server' import { IncomingMessage } from 'http' import * as ComAtprotoLabelDefs from './defs' @@ -33,9 +33,9 @@ export type Handler = ( ) => AsyncIterable export interface Labels { + $type?: 'com.atproto.label.subscribeLabels#labels' seq: number labels: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isLabels(v: unknown): v is Labels & { @@ -49,9 +49,9 @@ export function validateLabels(v: unknown) { } export interface Info { + $type?: 'com.atproto.label.subscribeLabels#info' name: 'OutdatedCursor' | (string & {}) message?: string - [k: string]: unknown } export function isInfo( diff --git a/packages/bsky/src/lexicon/types/com/atproto/moderation/createReport.ts b/packages/bsky/src/lexicon/types/com/atproto/moderation/createReport.ts index 637e305f034..c8ea82a157c 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/moderation/createReport.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/moderation/createReport.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoModerationDefs from './defs' import * as ComAtprotoAdminDefs from '../admin/defs' @@ -23,7 +23,6 @@ export interface InputSchema { | ComAtprotoAdminDefs.RepoRef | ComAtprotoRepoStrongRef.Main | { $type: string; [k: string]: unknown } - [k: string]: unknown } export interface OutputSchema { @@ -36,7 +35,6 @@ export interface OutputSchema { | { $type: string; [k: string]: unknown } reportedBy: string createdAt: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/moderation/defs.ts b/packages/bsky/src/lexicon/types/com/atproto/moderation/defs.ts index 19d3a6afc3a..fc43a9776d9 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/moderation/defs.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/moderation/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'com.atproto.moderation.defs' diff --git a/packages/bsky/src/lexicon/types/com/atproto/repo/applyWrites.ts b/packages/bsky/src/lexicon/types/com/atproto/repo/applyWrites.ts index f0a4a7051dc..b1e8796d166 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/repo/applyWrites.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/repo/applyWrites.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoRepoDefs from './defs' @@ -21,13 +21,11 @@ export interface InputSchema { writes: (Create | Update | Delete)[] /** If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { commit?: ComAtprotoRepoDefs.CommitMeta results?: (CreateResult | UpdateResult | DeleteResult)[] - [k: string]: unknown } export interface HandlerInput { @@ -61,10 +59,10 @@ export type Handler = ( /** Operation which creates a new record. */ export interface Create { + $type?: 'com.atproto.repo.applyWrites#create' collection: string rkey?: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export function isCreate( @@ -79,10 +77,10 @@ export function validateCreate(v: unknown) { /** Operation which updates an existing record. */ export interface Update { + $type?: 'com.atproto.repo.applyWrites#update' collection: string rkey: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export function isUpdate( @@ -97,9 +95,9 @@ export function validateUpdate(v: unknown) { /** Operation which deletes an existing record. */ export interface Delete { + $type?: 'com.atproto.repo.applyWrites#delete' collection: string rkey: string - [k: string]: unknown } export function isDelete( @@ -113,10 +111,10 @@ export function validateDelete(v: unknown) { } export interface CreateResult { + $type?: 'com.atproto.repo.applyWrites#createResult' uri: string cid: string validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export function isCreateResult(v: unknown): v is CreateResult & { @@ -133,10 +131,10 @@ export function validateCreateResult(v: unknown) { } export interface UpdateResult { + $type?: 'com.atproto.repo.applyWrites#updateResult' uri: string cid: string validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export function isUpdateResult(v: unknown): v is UpdateResult & { @@ -153,7 +151,7 @@ export function validateUpdateResult(v: unknown) { } export interface DeleteResult { - [k: string]: unknown + $type?: 'com.atproto.repo.applyWrites#deleteResult' } export function isDeleteResult(v: unknown): v is DeleteResult & { diff --git a/packages/bsky/src/lexicon/types/com/atproto/repo/createRecord.ts b/packages/bsky/src/lexicon/types/com/atproto/repo/createRecord.ts index 492e3048ed4..2f3614bd564 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/repo/createRecord.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/repo/createRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoRepoDefs from './defs' @@ -23,10 +23,9 @@ export interface InputSchema { /** 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. */ validate?: boolean /** The record itself. Must contain a $type field. */ - record: {} + record: { [_ in string]: unknown } /** Compare and swap with the previous commit by CID. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { @@ -34,7 +33,6 @@ export interface OutputSchema { cid: string commit?: ComAtprotoRepoDefs.CommitMeta validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/repo/defs.ts b/packages/bsky/src/lexicon/types/com/atproto/repo/defs.ts index ea541bb4f91..b4667e3ce09 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/repo/defs.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/repo/defs.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'com.atproto.repo.defs' export interface CommitMeta { + $type?: 'com.atproto.repo.defs#commitMeta' cid: string rev: string - [k: string]: unknown } export function isCommitMeta( diff --git a/packages/bsky/src/lexicon/types/com/atproto/repo/deleteRecord.ts b/packages/bsky/src/lexicon/types/com/atproto/repo/deleteRecord.ts index ac54176bb9a..90d6a586362 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/repo/deleteRecord.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/repo/deleteRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoRepoDefs from './defs' @@ -24,12 +24,10 @@ export interface InputSchema { swapRecord?: string /** Compare and swap with the previous commit by CID. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { commit?: ComAtprotoRepoDefs.CommitMeta - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/repo/describeRepo.ts b/packages/bsky/src/lexicon/types/com/atproto/repo/describeRepo.ts index f00bfad6834..4c78cc81d47 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/repo/describeRepo.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/repo/describeRepo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.describeRepo' @@ -21,12 +21,11 @@ export interface OutputSchema { handle: string did: string /** The complete DID document for this account. */ - didDoc: {} + didDoc: { [_ in string]: unknown } /** List of all the collections (NSIDs) for which this repo contains at least one record. */ collections: string[] /** Indicates if handle is currently valid (resolves bi-directionally) */ handleIsCorrect: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/repo/getRecord.ts b/packages/bsky/src/lexicon/types/com/atproto/repo/getRecord.ts index f79ea793e77..bd1a84333c5 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/repo/getRecord.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/repo/getRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.getRecord' @@ -26,8 +26,7 @@ export type InputSchema = undefined export interface OutputSchema { uri: string cid?: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/repo/importRepo.ts b/packages/bsky/src/lexicon/types/com/atproto/repo/importRepo.ts index 51c0d85a347..4054deb37c2 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/repo/importRepo.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/repo/importRepo.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.importRepo' diff --git a/packages/bsky/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts b/packages/bsky/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts index 517ce3e6bc1..0b33fb26306 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.listMissingBlobs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string blobs: RecordBlob[] - [k: string]: unknown } export type HandlerInput = undefined @@ -49,9 +48,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface RecordBlob { + $type?: 'com.atproto.repo.listMissingBlobs#recordBlob' cid: string recordUri: string - [k: string]: unknown } export function isRecordBlob(v: unknown): v is RecordBlob & { diff --git a/packages/bsky/src/lexicon/types/com/atproto/repo/listRecords.ts b/packages/bsky/src/lexicon/types/com/atproto/repo/listRecords.ts index b559aaf3f5c..c46478e5277 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/repo/listRecords.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/repo/listRecords.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.listRecords' @@ -31,7 +31,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string records: Record[] - [k: string]: unknown } export type HandlerInput = undefined @@ -60,10 +59,10 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Record { + $type?: 'com.atproto.repo.listRecords#record' uri: string cid: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export function isRecord( diff --git a/packages/bsky/src/lexicon/types/com/atproto/repo/putRecord.ts b/packages/bsky/src/lexicon/types/com/atproto/repo/putRecord.ts index c5a23a1c583..2b6df533db4 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/repo/putRecord.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/repo/putRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoRepoDefs from './defs' @@ -23,12 +23,11 @@ export interface InputSchema { /** 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. */ validate?: boolean /** The record to write. */ - record: {} + record: { [_ in string]: unknown } /** Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation */ swapRecord?: string | null /** Compare and swap with the previous commit by CID. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { @@ -36,7 +35,6 @@ export interface OutputSchema { cid: string commit?: ComAtprotoRepoDefs.CommitMeta validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/repo/strongRef.ts b/packages/bsky/src/lexicon/types/com/atproto/repo/strongRef.ts index 0afb7bd7fa8..a984a5c929f 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/repo/strongRef.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/repo/strongRef.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'com.atproto.repo.strongRef' export interface Main { + $type?: 'com.atproto.repo.strongRef' | 'com.atproto.repo.strongRef#main' uri: string cid: string - [k: string]: unknown } export function isMain( diff --git a/packages/bsky/src/lexicon/types/com/atproto/repo/uploadBlob.ts b/packages/bsky/src/lexicon/types/com/atproto/repo/uploadBlob.ts index d31911aafe3..2c1852fb9b7 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/repo/uploadBlob.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/repo/uploadBlob.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.uploadBlob' @@ -17,7 +17,6 @@ export type InputSchema = string | Uint8Array | Blob export interface OutputSchema { blob: BlobRef - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/activateAccount.ts b/packages/bsky/src/lexicon/types/com/atproto/server/activateAccount.ts index fcadc8c2e62..e285e773122 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/activateAccount.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/activateAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.activateAccount' diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/checkAccountStatus.ts b/packages/bsky/src/lexicon/types/com/atproto/server/checkAccountStatus.ts index 3d927cd3980..cf1e1390d00 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/checkAccountStatus.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/checkAccountStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.checkAccountStatus' @@ -24,7 +24,6 @@ export interface OutputSchema { privateStateValues: number expectedBlobs: number importedBlobs: number - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/confirmEmail.ts b/packages/bsky/src/lexicon/types/com/atproto/server/confirmEmail.ts index 809a95a216b..d72997ec90a 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/confirmEmail.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/confirmEmail.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.confirmEmail' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { email: string token: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/createAccount.ts b/packages/bsky/src/lexicon/types/com/atproto/server/createAccount.ts index 538e8cb28e7..1b8636d0207 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/createAccount.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/createAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createAccount' @@ -26,8 +26,7 @@ export interface InputSchema { /** DID PLC rotation key (aka, recovery key) to be included in PLC creation operation. */ recoveryKey?: string /** 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. */ - plcOp?: {} - [k: string]: unknown + plcOp?: { [_ in string]: unknown } } /** Account login session returned on successful account creation. */ @@ -38,8 +37,7 @@ export interface OutputSchema { /** The DID of the new account. */ did: string /** Complete DID document. */ - didDoc?: {} - [k: string]: unknown + didDoc?: { [_ in string]: unknown } } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/createAppPassword.ts b/packages/bsky/src/lexicon/types/com/atproto/server/createAppPassword.ts index 22a46eab052..2725e0598b2 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/createAppPassword.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/createAppPassword.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createAppPassword' @@ -17,7 +17,6 @@ export interface InputSchema { name: string /** If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients. */ privileged?: boolean - [k: string]: unknown } export type OutputSchema = AppPassword @@ -52,11 +51,11 @@ export type Handler = ( ) => Promise | HandlerOutput export interface AppPassword { + $type?: 'com.atproto.server.createAppPassword#appPassword' name: string password: string createdAt: string privileged?: boolean - [k: string]: unknown } export function isAppPassword(v: unknown): v is AppPassword & { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/createInviteCode.ts b/packages/bsky/src/lexicon/types/com/atproto/server/createInviteCode.ts index 7ac6989797f..0280eb95aca 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/createInviteCode.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/createInviteCode.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createInviteCode' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { useCount: number forAccount?: string - [k: string]: unknown } export interface OutputSchema { code: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/createInviteCodes.ts b/packages/bsky/src/lexicon/types/com/atproto/server/createInviteCodes.ts index 120d2ae637f..6b88193fe60 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/createInviteCodes.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/createInviteCodes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createInviteCodes' @@ -16,12 +16,10 @@ export interface InputSchema { codeCount: number useCount: number forAccounts?: string[] - [k: string]: unknown } export interface OutputSchema { codes: AccountCodes[] - [k: string]: unknown } export interface HandlerInput { @@ -53,9 +51,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface AccountCodes { + $type?: 'com.atproto.server.createInviteCodes#accountCodes' account: string codes: string[] - [k: string]: unknown } export function isAccountCodes(v: unknown): v is AccountCodes & { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/createSession.ts b/packages/bsky/src/lexicon/types/com/atproto/server/createSession.ts index d2a4cbda1ed..efd3ee603a3 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/createSession.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/createSession.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createSession' @@ -17,7 +17,6 @@ export interface InputSchema { identifier: string password: string authFactorToken?: string - [k: string]: unknown } export interface OutputSchema { @@ -25,14 +24,13 @@ export interface OutputSchema { refreshJwt: string handle: string did: string - didDoc?: {} + didDoc?: { [_ in string]: unknown } email?: string emailConfirmed?: boolean emailAuthFactor?: boolean active?: boolean /** 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. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/deactivateAccount.ts b/packages/bsky/src/lexicon/types/com/atproto/server/deactivateAccount.ts index 0a52f27f203..36bd7a2a97e 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/deactivateAccount.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/deactivateAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.deactivateAccount' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { /** A recommendation to server as to how long they should hold onto the deactivated account before deleting. */ deleteAfter?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/defs.ts b/packages/bsky/src/lexicon/types/com/atproto/server/defs.ts index 1e25a6e6a22..5eb80492ca3 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/defs.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/defs.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'com.atproto.server.defs' export interface InviteCode { + $type?: 'com.atproto.server.defs#inviteCode' code: string available: number disabled: boolean @@ -16,7 +17,6 @@ export interface InviteCode { createdBy: string createdAt: string uses: InviteCodeUse[] - [k: string]: unknown } export function isInviteCode( @@ -33,9 +33,9 @@ export function validateInviteCode(v: unknown) { } export interface InviteCodeUse { + $type?: 'com.atproto.server.defs#inviteCodeUse' usedBy: string usedAt: string - [k: string]: unknown } export function isInviteCodeUse(v: unknown): v is InviteCodeUse & { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/deleteAccount.ts b/packages/bsky/src/lexicon/types/com/atproto/server/deleteAccount.ts index 49fd95f0561..6b1d89fea35 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/deleteAccount.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/deleteAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.deleteAccount' @@ -16,7 +16,6 @@ export interface InputSchema { did: string password: string token: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/deleteSession.ts b/packages/bsky/src/lexicon/types/com/atproto/server/deleteSession.ts index f54d8729338..11cd4281d85 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/deleteSession.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/deleteSession.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.deleteSession' diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/describeServer.ts b/packages/bsky/src/lexicon/types/com/atproto/server/describeServer.ts index ffeeaeaaf73..50f085ac820 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/describeServer.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/describeServer.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.describeServer' @@ -24,7 +24,6 @@ export interface OutputSchema { links?: Links contact?: Contact did: string - [k: string]: unknown } export type HandlerInput = undefined @@ -53,9 +52,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Links { + $type?: 'com.atproto.server.describeServer#links' privacyPolicy?: string termsOfService?: string - [k: string]: unknown } export function isLinks( @@ -69,8 +68,8 @@ export function validateLinks(v: unknown) { } export interface Contact { + $type?: 'com.atproto.server.describeServer#contact' email?: string - [k: string]: unknown } export function isContact(v: unknown): v is Contact & { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts b/packages/bsky/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts index b2d8d3d4bf0..4a653ad2bc3 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoServerDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { codes: ComAtprotoServerDefs.InviteCode[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/getServiceAuth.ts b/packages/bsky/src/lexicon/types/com/atproto/server/getServiceAuth.ts index 3761607e5fc..307b34abc18 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/getServiceAuth.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/getServiceAuth.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.getServiceAuth' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { token: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/getSession.ts b/packages/bsky/src/lexicon/types/com/atproto/server/getSession.ts index 0e135e869f6..24baae80b75 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/getSession.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/getSession.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.getSession' @@ -20,11 +20,10 @@ export interface OutputSchema { email?: string emailConfirmed?: boolean emailAuthFactor?: boolean - didDoc?: {} + didDoc?: { [_ in string]: unknown } active?: boolean /** 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. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/listAppPasswords.ts b/packages/bsky/src/lexicon/types/com/atproto/server/listAppPasswords.ts index daf997f7ad2..ad704069349 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/listAppPasswords.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/listAppPasswords.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.listAppPasswords' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { passwords: AppPassword[] - [k: string]: unknown } export type HandlerInput = undefined @@ -46,10 +45,10 @@ export type Handler = ( ) => Promise | HandlerOutput export interface AppPassword { + $type?: 'com.atproto.server.listAppPasswords#appPassword' name: string createdAt: string privileged?: boolean - [k: string]: unknown } export function isAppPassword(v: unknown): v is AppPassword & { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/refreshSession.ts b/packages/bsky/src/lexicon/types/com/atproto/server/refreshSession.ts index 91d548f3464..07453ff3efe 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/refreshSession.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/refreshSession.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.refreshSession' @@ -19,11 +19,10 @@ export interface OutputSchema { refreshJwt: string handle: string did: string - didDoc?: {} + didDoc?: { [_ in string]: unknown } active?: boolean /** Hosting status of the account. If not specified, then assume 'active'. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/requestAccountDelete.ts b/packages/bsky/src/lexicon/types/com/atproto/server/requestAccountDelete.ts index 5baa557a5f0..b6984683d3d 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/requestAccountDelete.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/requestAccountDelete.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.requestAccountDelete' diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts b/packages/bsky/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts index 21f3ee1b8f5..dc85343724f 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.requestEmailConfirmation' diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts b/packages/bsky/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts index a0e4de30b40..500d16f0221 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.requestEmailUpdate' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { tokenRequired: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/requestPasswordReset.ts b/packages/bsky/src/lexicon/types/com/atproto/server/requestPasswordReset.ts index cbf4ea57211..e60518dade5 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/requestPasswordReset.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/requestPasswordReset.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.requestPasswordReset' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { email: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/reserveSigningKey.ts b/packages/bsky/src/lexicon/types/com/atproto/server/reserveSigningKey.ts index 8042f4c69d0..a2a781136c4 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/reserveSigningKey.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/reserveSigningKey.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.reserveSigningKey' @@ -15,13 +15,11 @@ export interface QueryParams {} export interface InputSchema { /** The DID to reserve a key for. */ did?: string - [k: string]: unknown } export interface OutputSchema { /** The public key for the reserved signing key, in did:key serialization. */ signingKey: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/resetPassword.ts b/packages/bsky/src/lexicon/types/com/atproto/server/resetPassword.ts index 15cf59e86a4..db521bfff8f 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/resetPassword.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/resetPassword.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.resetPassword' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { token: string password: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/revokeAppPassword.ts b/packages/bsky/src/lexicon/types/com/atproto/server/revokeAppPassword.ts index 1cdbf9367d0..c0ab1fb0066 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/revokeAppPassword.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/revokeAppPassword.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.revokeAppPassword' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { name: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/server/updateEmail.ts b/packages/bsky/src/lexicon/types/com/atproto/server/updateEmail.ts index 334d4759c16..814f63c3178 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/server/updateEmail.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/server/updateEmail.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.updateEmail' @@ -17,7 +17,6 @@ export interface InputSchema { emailAuthFactor?: boolean /** Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed. */ token?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/getBlob.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/getBlob.ts index cba9708e6f9..730acfc2649 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/getBlob.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/getBlob.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getBlob' diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/getBlocks.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/getBlocks.ts index f298ef747f9..691aa82f29a 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/getBlocks.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/getBlocks.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getBlocks' diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/getCheckout.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/getCheckout.ts index 724e6908981..446c54b8aa5 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/getCheckout.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/getCheckout.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getCheckout' diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/getHead.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/getHead.ts index e6844bd8014..39d51046db9 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/getHead.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/getHead.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getHead' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { root: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/getLatestCommit.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/getLatestCommit.ts index ea409c07409..e3ace690bbc 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/getLatestCommit.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/getLatestCommit.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getLatestCommit' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cid: string rev: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/getRecord.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/getRecord.ts index e5611bad8e2..5e5c7c3730b 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/getRecord.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/getRecord.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getRecord' diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/getRepo.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/getRepo.ts index 4ec55779c56..93760a523dc 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/getRepo.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/getRepo.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getRepo' diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/getRepoStatus.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/getRepoStatus.ts index 6118cc70510..aea17516b5c 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/getRepoStatus.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/getRepoStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getRepoStatus' @@ -24,7 +24,6 @@ export interface OutputSchema { status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) /** Optional field, the current rev of the repo, if active=true */ rev?: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/listBlobs.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/listBlobs.ts index 0a1149bef5c..c0a4594e640 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/listBlobs.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/listBlobs.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.listBlobs' @@ -24,7 +24,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string cids: string[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/listRepos.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/listRepos.ts index f5802c5b49c..45c4d5a242d 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/listRepos.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/listRepos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.listRepos' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string repos: Repo[] - [k: string]: unknown } export type HandlerInput = undefined @@ -49,6 +48,7 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Repo { + $type?: 'com.atproto.sync.listRepos#repo' did: string /** Current repo commit CID */ head: string @@ -56,7 +56,6 @@ export interface Repo { active?: boolean /** 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. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export function isRepo( diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts index 985d3a91bc0..a514a0581a6 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.notifyOfUpdate' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { /** Hostname of the current service (usually a PDS) that is notifying of update. */ hostname: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/requestCrawl.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/requestCrawl.ts index 48cd29206db..c44c5706def 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/requestCrawl.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/requestCrawl.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.requestCrawl' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { /** Hostname of the current service (eg, PDS) that is requesting to be crawled. */ hostname: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/types/com/atproto/sync/subscribeRepos.ts b/packages/bsky/src/lexicon/types/com/atproto/sync/subscribeRepos.ts index 5c1e5546c67..e5186fe5173 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/sync/subscribeRepos.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, ErrorFrame } from '@atproto/xrpc-server' import { IncomingMessage } from 'http' @@ -38,6 +38,7 @@ export type Handler = ( /** 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. */ export interface Commit { + $type?: 'com.atproto.sync.subscribeRepos#commit' /** The stream sequence number of this message. */ seq: number /** DEPRECATED -- unused */ @@ -60,7 +61,6 @@ export interface Commit { blobs: CID[] /** Timestamp of when this message was originally broadcast. */ time: string - [k: string]: unknown } export function isCommit( @@ -75,12 +75,12 @@ export function validateCommit(v: unknown) { /** 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. */ export interface Identity { + $type?: 'com.atproto.sync.subscribeRepos#identity' seq: number did: string time: string /** 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. */ handle?: string - [k: string]: unknown } export function isIdentity(v: unknown): v is Identity & { @@ -95,6 +95,7 @@ export function validateIdentity(v: unknown) { /** 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. */ export interface Account { + $type?: 'com.atproto.sync.subscribeRepos#account' seq: number did: string time: string @@ -102,7 +103,6 @@ export interface Account { active: boolean /** If active=false, this optional field indicates a reason for why the account is not active. */ status?: 'takendown' | 'suspended' | 'deleted' | 'deactivated' | (string & {}) - [k: string]: unknown } export function isAccount(v: unknown): v is Account & { @@ -117,11 +117,11 @@ export function validateAccount(v: unknown) { /** DEPRECATED -- Use #identity event instead */ export interface Handle { + $type?: 'com.atproto.sync.subscribeRepos#handle' seq: number did: string handle: string time: string - [k: string]: unknown } export function isHandle( @@ -136,11 +136,11 @@ export function validateHandle(v: unknown) { /** DEPRECATED -- Use #account event instead */ export interface Migrate { + $type?: 'com.atproto.sync.subscribeRepos#migrate' seq: number did: string migrateTo: string | null time: string - [k: string]: unknown } export function isMigrate(v: unknown): v is Migrate & { @@ -155,10 +155,10 @@ export function validateMigrate(v: unknown) { /** DEPRECATED -- Use #account event instead */ export interface Tombstone { + $type?: 'com.atproto.sync.subscribeRepos#tombstone' seq: number did: string time: string - [k: string]: unknown } export function isTombstone(v: unknown): v is Tombstone & { @@ -172,9 +172,9 @@ export function validateTombstone(v: unknown) { } export interface Info { + $type?: 'com.atproto.sync.subscribeRepos#info' name: 'OutdatedCursor' | (string & {}) message?: string - [k: string]: unknown } export function isInfo( @@ -189,11 +189,11 @@ export function validateInfo(v: unknown) { /** A repo operation, ie a mutation of a single record. */ export interface RepoOp { + $type?: 'com.atproto.sync.subscribeRepos#repoOp' action: 'create' | 'update' | 'delete' | (string & {}) path: string /** For creates and updates, the new record CID. For deletions, null. */ cid: CID | null - [k: string]: unknown } export function isRepoOp( diff --git a/packages/bsky/src/lexicon/types/com/atproto/temp/checkSignupQueue.ts b/packages/bsky/src/lexicon/types/com/atproto/temp/checkSignupQueue.ts index 1d459f9b485..e765cb63993 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/temp/checkSignupQueue.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/temp/checkSignupQueue.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.temp.checkSignupQueue' @@ -18,7 +18,6 @@ export interface OutputSchema { activated: boolean placeInQueue?: number estimatedTimeMs?: number - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/temp/fetchLabels.ts b/packages/bsky/src/lexicon/types/com/atproto/temp/fetchLabels.ts index 761449f9989..8f7e99bd241 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/temp/fetchLabels.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/temp/fetchLabels.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoLabelDefs from '../label/defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { labels: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/bsky/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts b/packages/bsky/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts index 365429dca15..6a73668f25c 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.temp.requestPhoneVerification' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { phoneNumber: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/bsky/src/lexicon/util.ts b/packages/bsky/src/lexicon/util.ts index c7e9539d1f1..238eabe8742 100644 --- a/packages/bsky/src/lexicon/util.ts +++ b/packages/bsky/src/lexicon/util.ts @@ -1,6 +1,10 @@ /** * GENERATED CODE - DO NOT MODIFY */ +export type OmitKey = { + [K2 in keyof T as K2 extends K ? never : K2]: T[K2] +} + export type $Type = Hash extends 'main' ? Id | `${Id}#${Hash}` : `${Id}#${Hash}` diff --git a/packages/ozone/src/lexicon/lexicons.ts b/packages/ozone/src/lexicon/lexicons.ts index 03821c358c0..f0d88577b9a 100644 --- a/packages/ozone/src/lexicon/lexicons.ts +++ b/packages/ozone/src/lexicon/lexicons.ts @@ -13576,4 +13576,4 @@ export const ids = { ToolsOzoneTeamDeleteMember: 'tools.ozone.team.deleteMember', ToolsOzoneTeamListMembers: 'tools.ozone.team.listMembers', ToolsOzoneTeamUpdateMember: 'tools.ozone.team.updateMember', -} +} as const diff --git a/packages/ozone/src/lexicon/types/app/bsky/actor/defs.ts b/packages/ozone/src/lexicon/types/app/bsky/actor/defs.ts index 328965f4b18..2639dd12a1b 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/actor/defs.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/actor/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' import * as AppBskyGraphDefs from '../graph/defs' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' @@ -12,6 +12,7 @@ import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.actor.defs' export interface ProfileViewBasic { + $type?: 'app.bsky.actor.defs#profileViewBasic' did: string handle: string displayName?: string @@ -20,7 +21,6 @@ export interface ProfileViewBasic { viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] createdAt?: string - [k: string]: unknown } export function isProfileViewBasic(v: unknown): v is ProfileViewBasic & { @@ -37,6 +37,7 @@ export function validateProfileViewBasic(v: unknown) { } export interface ProfileView { + $type?: 'app.bsky.actor.defs#profileView' did: string handle: string displayName?: string @@ -47,7 +48,6 @@ export interface ProfileView { createdAt?: string viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isProfileView( @@ -64,6 +64,7 @@ export function validateProfileView(v: unknown) { } export interface ProfileViewDetailed { + $type?: 'app.bsky.actor.defs#profileViewDetailed' did: string handle: string displayName?: string @@ -80,7 +81,6 @@ export interface ProfileViewDetailed { viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] pinnedPost?: ComAtprotoRepoStrongRef.Main - [k: string]: unknown } export function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed & { @@ -97,12 +97,12 @@ export function validateProfileViewDetailed(v: unknown) { } export interface ProfileAssociated { + $type?: 'app.bsky.actor.defs#profileAssociated' lists?: number feedgens?: number starterPacks?: number labeler?: boolean chat?: ProfileAssociatedChat - [k: string]: unknown } export function isProfileAssociated(v: unknown): v is ProfileAssociated & { @@ -119,8 +119,8 @@ export function validateProfileAssociated(v: unknown) { } export interface ProfileAssociatedChat { + $type?: 'app.bsky.actor.defs#profileAssociatedChat' allowIncoming: 'all' | 'none' | 'following' | (string & {}) - [k: string]: unknown } export function isProfileAssociatedChat( @@ -140,6 +140,7 @@ export function validateProfileAssociatedChat(v: unknown) { /** 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 @@ -148,7 +149,6 @@ export interface ViewerState { following?: string followedBy?: string knownFollowers?: KnownFollowers - [k: string]: unknown } export function isViewerState( @@ -166,9 +166,9 @@ export function validateViewerState(v: unknown) { /** The subject's followers whom you also follow */ export interface KnownFollowers { + $type?: 'app.bsky.actor.defs#knownFollowers' count: number followers: ProfileViewBasic[] - [k: string]: unknown } export function isKnownFollowers(v: unknown): v is KnownFollowers & { @@ -201,8 +201,8 @@ export type Preferences = ( )[] export interface AdultContentPref { + $type?: 'app.bsky.actor.defs#adultContentPref' enabled: boolean - [k: string]: unknown } export function isAdultContentPref(v: unknown): v is AdultContentPref & { @@ -219,11 +219,11 @@ export function validateAdultContentPref(v: unknown) { } 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 & {}) - [k: string]: unknown } export function isContentLabelPref(v: unknown): v is ContentLabelPref & { @@ -240,11 +240,11 @@ export function validateContentLabelPref(v: unknown) { } export interface SavedFeed { + $type?: 'app.bsky.actor.defs#savedFeed' id: string type: 'feed' | 'list' | 'timeline' | (string & {}) value: string pinned: boolean - [k: string]: unknown } export function isSavedFeed( @@ -258,8 +258,8 @@ export function validateSavedFeed(v: unknown) { } export interface SavedFeedsPrefV2 { + $type?: 'app.bsky.actor.defs#savedFeedsPrefV2' items: SavedFeed[] - [k: string]: unknown } export function isSavedFeedsPrefV2(v: unknown): v is SavedFeedsPrefV2 & { @@ -276,10 +276,10 @@ export function validateSavedFeedsPrefV2(v: unknown) { } export interface SavedFeedsPref { + $type?: 'app.bsky.actor.defs#savedFeedsPref' pinned: string[] saved: string[] timelineIndex?: number - [k: string]: unknown } export function isSavedFeedsPref(v: unknown): v is SavedFeedsPref & { @@ -296,9 +296,9 @@ export function validateSavedFeedsPref(v: unknown) { } export interface PersonalDetailsPref { + $type?: 'app.bsky.actor.defs#personalDetailsPref' /** The birth date of account owner. */ birthDate?: string - [k: string]: unknown } export function isPersonalDetailsPref(v: unknown): v is PersonalDetailsPref & { @@ -315,6 +315,7 @@ export function validatePersonalDetailsPref(v: unknown) { } 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. */ @@ -327,7 +328,6 @@ export interface FeedViewPref { hideReposts?: boolean /** Hide quote posts in the feed. */ hideQuotePosts?: boolean - [k: string]: unknown } export function isFeedViewPref( @@ -344,11 +344,11 @@ export function validateFeedViewPref(v: unknown) { } export interface ThreadViewPref { + $type?: 'app.bsky.actor.defs#threadViewPref' /** Sorting mode for threads. */ sort?: 'oldest' | 'newest' | 'most-likes' | 'random' | (string & {}) /** Show followed users at the top of all replies. */ prioritizeFollowedUsers?: boolean - [k: string]: unknown } export function isThreadViewPref(v: unknown): v is ThreadViewPref & { @@ -365,9 +365,9 @@ export function validateThreadViewPref(v: unknown) { } 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[] - [k: string]: unknown } export function isInterestsPref(v: unknown): v is InterestsPref & { @@ -387,6 +387,7 @@ export type MutedWordTarget = 'content' | 'tag' | (string & {}) /** 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 @@ -396,7 +397,6 @@ export interface MutedWord { actorTarget: 'all' | 'exclude-following' | (string & {}) /** The date and time at which the muted word will expire and no longer be applied. */ expiresAt?: string - [k: string]: unknown } export function isMutedWord( @@ -410,9 +410,9 @@ export function validateMutedWord(v: unknown) { } export interface MutedWordsPref { + $type?: 'app.bsky.actor.defs#mutedWordsPref' /** A list of words the account owner has muted. */ items: MutedWord[] - [k: string]: unknown } export function isMutedWordsPref(v: unknown): v is MutedWordsPref & { @@ -429,9 +429,9 @@ export function validateMutedWordsPref(v: unknown) { } export interface HiddenPostsPref { + $type?: 'app.bsky.actor.defs#hiddenPostsPref' /** A list of URIs of posts the account owner has hidden. */ items: string[] - [k: string]: unknown } export function isHiddenPostsPref(v: unknown): v is HiddenPostsPref & { @@ -448,8 +448,8 @@ export function validateHiddenPostsPref(v: unknown) { } export interface LabelersPref { + $type?: 'app.bsky.actor.defs#labelersPref' labelers: LabelerPrefItem[] - [k: string]: unknown } export function isLabelersPref( @@ -466,8 +466,8 @@ export function validateLabelersPref(v: unknown) { } export interface LabelerPrefItem { + $type?: 'app.bsky.actor.defs#labelerPrefItem' did: string - [k: string]: unknown } export function isLabelerPrefItem(v: unknown): v is LabelerPrefItem & { @@ -485,12 +485,12 @@ export function validateLabelerPrefItem(v: unknown) { /** 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[] - [k: string]: unknown } export function isBskyAppStatePref(v: unknown): v is BskyAppStatePref & { @@ -508,8 +508,8 @@ export function validateBskyAppStatePref(v: unknown) { /** 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 - [k: string]: unknown } export function isBskyAppProgressGuide( @@ -529,13 +529,13 @@ export function validateBskyAppProgressGuide(v: unknown) { /** 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 - [k: string]: unknown } export function isNux( diff --git a/packages/ozone/src/lexicon/types/app/bsky/actor/getPreferences.ts b/packages/ozone/src/lexicon/types/app/bsky/actor/getPreferences.ts index 05250886bac..0eaa39da433 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/actor/getPreferences.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/actor/getPreferences.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -17,7 +17,6 @@ export type InputSchema = undefined export interface OutputSchema { preferences: AppBskyActorDefs.Preferences - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/actor/getProfile.ts b/packages/ozone/src/lexicon/types/app/bsky/actor/getProfile.ts index 03f7ba1e696..7f88e389db6 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/actor/getProfile.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/actor/getProfile.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' diff --git a/packages/ozone/src/lexicon/types/app/bsky/actor/getProfiles.ts b/packages/ozone/src/lexicon/types/app/bsky/actor/getProfiles.ts index 812ee707643..75f82cd708a 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/actor/getProfiles.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/actor/getProfiles.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { profiles: AppBskyActorDefs.ProfileViewDetailed[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts b/packages/ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts index 6881ca4a977..03fba3565f5 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string actors: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/actor/profile.ts b/packages/ozone/src/lexicon/types/app/bsky/actor/profile.ts index 59193587c97..d884084db62 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/actor/profile.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/actor/profile.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.actor.profile' export interface Record { + $type?: 'app.bsky.actor.profile' | 'app.bsky.actor.profile#main' displayName?: string /** Free-form profile description text. */ description?: string diff --git a/packages/ozone/src/lexicon/types/app/bsky/actor/putPreferences.ts b/packages/ozone/src/lexicon/types/app/bsky/actor/putPreferences.ts index 98ec8ef5bbe..3910dc2397e 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/actor/putPreferences.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/actor/putPreferences.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { preferences: AppBskyActorDefs.Preferences - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/app/bsky/actor/searchActors.ts b/packages/ozone/src/lexicon/types/app/bsky/actor/searchActors.ts index 62a7b64110c..fac3a323ef6 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/actor/searchActors.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/actor/searchActors.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -25,7 +25,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string actors: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts b/packages/ozone/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts index 226a539deeb..f9aaad0f9a1 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { actors: AppBskyActorDefs.ProfileViewBasic[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/embed/defs.ts b/packages/ozone/src/lexicon/types/app/bsky/embed/defs.ts index 6e5086aebe2..d6f76b22906 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/embed/defs.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/embed/defs.ts @@ -4,15 +4,15 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export 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 - [k: string]: unknown } export function isAspectRatio( diff --git a/packages/ozone/src/lexicon/types/app/bsky/embed/external.ts b/packages/ozone/src/lexicon/types/app/bsky/embed/external.ts index 95ac98d8ad8..930b9cb69ad 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/embed/external.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/embed/external.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export 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' | 'app.bsky.embed.external#main' external: External - [k: string]: unknown } export function isMain( @@ -25,11 +25,11 @@ export function validateMain(v: unknown) { } export interface External { + $type?: 'app.bsky.embed.external#external' uri: string title: string description: string thumb?: BlobRef - [k: string]: unknown } export function isExternal( @@ -43,8 +43,8 @@ export function validateExternal(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.external#view' external: ViewExternal - [k: string]: unknown } export function isView( @@ -58,11 +58,11 @@ export function validateView(v: unknown) { } export interface ViewExternal { + $type?: 'app.bsky.embed.external#viewExternal' uri: string title: string description: string thumb?: string - [k: string]: unknown } export function isViewExternal(v: unknown): v is ViewExternal & { diff --git a/packages/ozone/src/lexicon/types/app/bsky/embed/images.ts b/packages/ozone/src/lexicon/types/app/bsky/embed/images.ts index dc2a1cb1592..e2200856388 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/embed/images.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/embed/images.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyEmbedDefs from './defs' export const id = 'app.bsky.embed.images' export interface Main { + $type?: 'app.bsky.embed.images' | 'app.bsky.embed.images#main' images: Image[] - [k: string]: unknown } export function isMain( @@ -25,11 +25,11 @@ export function validateMain(v: unknown) { } export interface Image { + $type?: 'app.bsky.embed.images#image' image: BlobRef /** Alt text description of the image, for accessibility. */ alt: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isImage( @@ -43,8 +43,8 @@ export function validateImage(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.images#view' images: ViewImage[] - [k: string]: unknown } export function isView( @@ -58,6 +58,7 @@ export function validateView(v: unknown) { } 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. */ @@ -65,7 +66,6 @@ export interface ViewImage { /** Alt text description of the image, for accessibility. */ alt: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isViewImage( diff --git a/packages/ozone/src/lexicon/types/app/bsky/embed/record.ts b/packages/ozone/src/lexicon/types/app/bsky/embed/record.ts index 7740a9f83ab..24e795211a1 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/embed/record.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/embed/record.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' import * as AppBskyFeedDefs from '../feed/defs' import * as AppBskyGraphDefs from '../graph/defs' @@ -19,8 +19,8 @@ import * as AppBskyEmbedRecordWithMedia from './recordWithMedia' export const id = 'app.bsky.embed.record' export interface Main { + $type?: 'app.bsky.embed.record' | 'app.bsky.embed.record#main' record: ComAtprotoRepoStrongRef.Main - [k: string]: unknown } export function isMain( @@ -34,6 +34,7 @@ export function validateMain(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.record#view' record: | ViewRecord | ViewNotFound @@ -44,7 +45,6 @@ export interface View { | AppBskyLabelerDefs.LabelerView | AppBskyGraphDefs.StarterPackViewBasic | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isView( @@ -58,11 +58,12 @@ export function validateView(v: unknown) { } export interface ViewRecord { + $type?: 'app.bsky.embed.record#viewRecord' uri: string cid: string author: AppBskyActorDefs.ProfileViewBasic /** The record data itself. */ - value: {} + value: { [_ in string]: unknown } labels?: ComAtprotoLabelDefs.Label[] replyCount?: number repostCount?: number @@ -77,7 +78,6 @@ export interface ViewRecord { | { $type: string; [k: string]: unknown } )[] indexedAt: string - [k: string]: unknown } export function isViewRecord( @@ -94,9 +94,9 @@ export function validateViewRecord(v: unknown) { } export interface ViewNotFound { + $type?: 'app.bsky.embed.record#viewNotFound' uri: string notFound: true - [k: string]: unknown } export function isViewNotFound(v: unknown): v is ViewNotFound & { @@ -113,10 +113,10 @@ export function validateViewNotFound(v: unknown) { } export interface ViewBlocked { + $type?: 'app.bsky.embed.record#viewBlocked' uri: string blocked: true author: AppBskyFeedDefs.BlockedAuthor - [k: string]: unknown } export function isViewBlocked( @@ -133,9 +133,9 @@ export function validateViewBlocked(v: unknown) { } export interface ViewDetached { + $type?: 'app.bsky.embed.record#viewDetached' uri: string detached: true - [k: string]: unknown } export function isViewDetached(v: unknown): v is ViewDetached & { diff --git a/packages/ozone/src/lexicon/types/app/bsky/embed/recordWithMedia.ts b/packages/ozone/src/lexicon/types/app/bsky/embed/recordWithMedia.ts index 46b9a019a81..060a8d92eda 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/embed/recordWithMedia.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/embed/recordWithMedia.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyEmbedRecord from './record' import * as AppBskyEmbedImages from './images' import * as AppBskyEmbedVideo from './video' @@ -13,13 +13,15 @@ import * as AppBskyEmbedExternal from './external' export const id = 'app.bsky.embed.recordWithMedia' export interface Main { + $type?: + | 'app.bsky.embed.recordWithMedia' + | 'app.bsky.embed.recordWithMedia#main' record: AppBskyEmbedRecord.Main media: | AppBskyEmbedImages.Main | AppBskyEmbedVideo.Main | AppBskyEmbedExternal.Main | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isMain( @@ -33,13 +35,13 @@ export function validateMain(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.recordWithMedia#view' record: AppBskyEmbedRecord.View media: | AppBskyEmbedImages.View | AppBskyEmbedVideo.View | AppBskyEmbedExternal.View | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isView( diff --git a/packages/ozone/src/lexicon/types/app/bsky/embed/video.ts b/packages/ozone/src/lexicon/types/app/bsky/embed/video.ts index c688d3eeb3a..5ab82479197 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/embed/video.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/embed/video.ts @@ -4,18 +4,18 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyEmbedDefs from './defs' export const id = 'app.bsky.embed.video' export interface Main { + $type?: 'app.bsky.embed.video' | 'app.bsky.embed.video#main' video: BlobRef captions?: Caption[] /** Alt text description of the video, for accessibility. */ alt?: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isMain( @@ -29,9 +29,9 @@ export function validateMain(v: unknown) { } export interface Caption { + $type?: 'app.bsky.embed.video#caption' lang: string file: BlobRef - [k: string]: unknown } export function isCaption( @@ -45,12 +45,12 @@ export function validateCaption(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.video#view' cid: string playlist: string thumbnail?: string alt?: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isView( diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/defs.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/defs.ts index 214907b3a54..3ccf73551e8 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/defs.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyActorDefs from '../actor/defs' import * as AppBskyEmbedImages from '../embed/images' import * as AppBskyEmbedVideo from '../embed/video' @@ -18,10 +18,11 @@ import * as AppBskyGraphDefs from '../graph/defs' export const id = 'app.bsky.feed.defs' export interface PostView { + $type?: 'app.bsky.feed.defs#postView' uri: string cid: string author: AppBskyActorDefs.ProfileViewBasic - record: {} + record: { [_ in string]: unknown } embed?: | AppBskyEmbedImages.View | AppBskyEmbedVideo.View @@ -37,7 +38,6 @@ export interface PostView { viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] threadgate?: ThreadgateView - [k: string]: unknown } export function isPostView( @@ -52,13 +52,13 @@ export function validatePostView(v: unknown) { /** 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 threadMuted?: boolean replyDisabled?: boolean embeddingDisabled?: boolean pinned?: boolean - [k: string]: unknown } export function isViewerState( @@ -75,12 +75,12 @@ export function validateViewerState(v: unknown) { } export interface FeedViewPost { + $type?: 'app.bsky.feed.defs#feedViewPost' post: PostView reply?: ReplyRef reason?: ReasonRepost | ReasonPin | { $type: string; [k: string]: unknown } /** Context provided by feed generator that may be passed back alongside interactions. */ feedContext?: string - [k: string]: unknown } export function isFeedViewPost( @@ -97,6 +97,7 @@ export function validateFeedViewPost(v: unknown) { } export interface ReplyRef { + $type?: 'app.bsky.feed.defs#replyRef' root: | PostView | NotFoundPost @@ -108,7 +109,6 @@ export interface ReplyRef { | BlockedPost | { $type: string; [k: string]: unknown } grandparentAuthor?: AppBskyActorDefs.ProfileViewBasic - [k: string]: unknown } export function isReplyRef( @@ -122,9 +122,9 @@ export function validateReplyRef(v: unknown) { } export interface ReasonRepost { + $type?: 'app.bsky.feed.defs#reasonRepost' by: AppBskyActorDefs.ProfileViewBasic indexedAt: string - [k: string]: unknown } export function isReasonRepost( @@ -141,7 +141,7 @@ export function validateReasonRepost(v: unknown) { } export interface ReasonPin { - [k: string]: unknown + $type?: 'app.bsky.feed.defs#reasonPin' } export function isReasonPin( @@ -155,6 +155,7 @@ export function validateReasonPin(v: unknown) { } export interface ThreadViewPost { + $type?: 'app.bsky.feed.defs#threadViewPost' post: PostView parent?: | ThreadViewPost @@ -167,7 +168,6 @@ export interface ThreadViewPost { | BlockedPost | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export function isThreadViewPost(v: unknown): v is ThreadViewPost & { @@ -184,9 +184,9 @@ export function validateThreadViewPost(v: unknown) { } export interface NotFoundPost { + $type?: 'app.bsky.feed.defs#notFoundPost' uri: string notFound: true - [k: string]: unknown } export function isNotFoundPost( @@ -203,10 +203,10 @@ export function validateNotFoundPost(v: unknown) { } export interface BlockedPost { + $type?: 'app.bsky.feed.defs#blockedPost' uri: string blocked: true author: BlockedAuthor - [k: string]: unknown } export function isBlockedPost( @@ -223,9 +223,9 @@ export function validateBlockedPost(v: unknown) { } export interface BlockedAuthor { + $type?: 'app.bsky.feed.defs#blockedAuthor' did: string viewer?: AppBskyActorDefs.ViewerState - [k: string]: unknown } export function isBlockedAuthor(v: unknown): v is BlockedAuthor & { @@ -242,6 +242,7 @@ export function validateBlockedAuthor(v: unknown) { } export interface GeneratorView { + $type?: 'app.bsky.feed.defs#generatorView' uri: string cid: string did: string @@ -255,7 +256,6 @@ export interface GeneratorView { labels?: ComAtprotoLabelDefs.Label[] viewer?: GeneratorViewerState indexedAt: string - [k: string]: unknown } export function isGeneratorView(v: unknown): v is GeneratorView & { @@ -272,8 +272,8 @@ export function validateGeneratorView(v: unknown) { } export interface GeneratorViewerState { + $type?: 'app.bsky.feed.defs#generatorViewerState' like?: string - [k: string]: unknown } export function isGeneratorViewerState( @@ -292,6 +292,7 @@ export function validateGeneratorViewerState(v: unknown) { } export interface SkeletonFeedPost { + $type?: 'app.bsky.feed.defs#skeletonFeedPost' post: string reason?: | SkeletonReasonRepost @@ -299,7 +300,6 @@ export interface SkeletonFeedPost { | { $type: string; [k: string]: unknown } /** Context that will be passed through to client and may be passed to feed generator back alongside interactions. */ feedContext?: string - [k: string]: unknown } export function isSkeletonFeedPost(v: unknown): v is SkeletonFeedPost & { @@ -316,8 +316,8 @@ export function validateSkeletonFeedPost(v: unknown) { } export interface SkeletonReasonRepost { + $type?: 'app.bsky.feed.defs#skeletonReasonRepost' repost: string - [k: string]: unknown } export function isSkeletonReasonRepost( @@ -336,7 +336,7 @@ export function validateSkeletonReasonRepost(v: unknown) { } export interface SkeletonReasonPin { - [k: string]: unknown + $type?: 'app.bsky.feed.defs#skeletonReasonPin' } export function isSkeletonReasonPin(v: unknown): v is SkeletonReasonPin & { @@ -353,11 +353,11 @@ export function validateSkeletonReasonPin(v: unknown) { } export interface ThreadgateView { + $type?: 'app.bsky.feed.defs#threadgateView' uri?: string cid?: string - record?: {} + record?: { [_ in string]: unknown } lists?: AppBskyGraphDefs.ListViewBasic[] - [k: string]: unknown } export function isThreadgateView(v: unknown): v is ThreadgateView & { @@ -374,6 +374,7 @@ export function validateThreadgateView(v: unknown) { } export interface Interaction { + $type?: 'app.bsky.feed.defs#interaction' item?: string event?: | 'app.bsky.feed.defs#requestLess' @@ -391,7 +392,6 @@ export interface Interaction { | (string & {}) /** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. */ feedContext?: string - [k: string]: unknown } export function isInteraction( diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts index e76c4e836da..f8cef3e6bf9 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.feed.describeFeedGenerator' @@ -18,7 +18,6 @@ export interface OutputSchema { did: string feeds: Feed[] links?: Links - [k: string]: unknown } export type HandlerInput = undefined @@ -47,8 +46,8 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Feed { + $type?: 'app.bsky.feed.describeFeedGenerator#feed' uri: string - [k: string]: unknown } export function isFeed( @@ -62,9 +61,9 @@ export function validateFeed(v: unknown) { } export interface Links { + $type?: 'app.bsky.feed.describeFeedGenerator#links' privacyPolicy?: string termsOfService?: string - [k: string]: unknown } export function isLinks(v: unknown): v is Links & { diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/generator.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/generator.ts index af54d689d16..09af4502f85 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/generator.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/generator.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyRichtextFacet from '../richtext/facet' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.feed.generator' export interface Record { + $type?: 'app.bsky.feed.generator' | 'app.bsky.feed.generator#main' did: string displayName: string description?: string diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getActorFeeds.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getActorFeeds.ts index 1d6e18a7c0f..92ef78e3fa1 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getActorFeeds.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getActorFeeds.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getActorLikes.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getActorLikes.ts index b08c59ca52f..99aeb585dfe 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getActorLikes.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getActorLikes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts index b750af2a05c..9c66a9955e9 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -30,7 +30,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getFeed.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getFeed.ts index 255200d8e0e..f613fc74716 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getFeed.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getFeed.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts index 72a8e62049b..5c8167d093f 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -24,7 +24,6 @@ export interface OutputSchema { isOnline: boolean /** Indicates whether the feed generator service is compatible with the record declaration. */ isValid: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts index 0ae7bcb02fc..0f1ece530d3 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts index 66a4422d697..6d65f590f5d 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.SkeletonFeedPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getLikes.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getLikes.ts index 2252a4a4684..180768c80c5 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getLikes.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getLikes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -27,7 +27,6 @@ export interface OutputSchema { cid?: string cursor?: string likes: Like[] - [k: string]: unknown } export type HandlerInput = undefined @@ -56,10 +55,10 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Like { + $type?: 'app.bsky.feed.getLikes#like' indexedAt: string createdAt: string actor: AppBskyActorDefs.ProfileView - [k: string]: unknown } export function isLike( diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getListFeed.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getListFeed.ts index 3863453bc4b..468a2d4302f 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getListFeed.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getListFeed.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getPostThread.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getPostThread.ts index af76f8129f3..12a0fdaefb9 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getPostThread.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getPostThread.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -29,7 +29,6 @@ export interface OutputSchema { | AppBskyFeedDefs.BlockedPost | { $type: string; [k: string]: unknown } threadgate?: AppBskyFeedDefs.ThreadgateView - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getPosts.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getPosts.ts index 5895857ac72..0bad32bfba9 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getPosts.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getPosts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { posts: AppBskyFeedDefs.PostView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getQuotes.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getQuotes.ts index afe599dce94..a0bdd075b14 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getQuotes.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getQuotes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -27,7 +27,6 @@ export interface OutputSchema { cid?: string cursor?: string posts: AppBskyFeedDefs.PostView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getRepostedBy.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getRepostedBy.ts index da59510e793..3c222f42ae1 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getRepostedBy.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getRepostedBy.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -27,7 +27,6 @@ export interface OutputSchema { cid?: string cursor?: string repostedBy: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts index b878f00e9c4..ccf2c4deb00 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/getTimeline.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/getTimeline.ts index 7eb11ed9637..ffd1908845e 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/getTimeline.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/getTimeline.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/like.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/like.ts index 118a1606100..8ced2a820c4 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/like.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/like.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.feed.like' export interface Record { + $type?: 'app.bsky.feed.like' | 'app.bsky.feed.like#main' subject: ComAtprotoRepoStrongRef.Main createdAt: string [k: string]: unknown diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/post.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/post.ts index b63e9ae63dd..2a96858ccc3 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/post.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/post.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyRichtextFacet from '../richtext/facet' import * as AppBskyEmbedImages from '../embed/images' import * as AppBskyEmbedVideo from '../embed/video' @@ -17,6 +17,7 @@ import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.feed.post' export interface Record { + $type?: 'app.bsky.feed.post' | 'app.bsky.feed.post#main' /** The primary post content. May be an empty string, if there are embeds. */ text: string /** DEPRECATED: replaced by app.bsky.richtext.facet. */ @@ -54,9 +55,9 @@ export function validateRecord(v: unknown) { } export interface ReplyRef { + $type?: 'app.bsky.feed.post#replyRef' root: ComAtprotoRepoStrongRef.Main parent: ComAtprotoRepoStrongRef.Main - [k: string]: unknown } export function isReplyRef( @@ -71,11 +72,11 @@ export function validateReplyRef(v: unknown) { /** 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 - [k: string]: unknown } export function isEntity( @@ -90,9 +91,9 @@ export function validateEntity(v: unknown) { /** 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 - [k: string]: unknown } export function isTextSlice( diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/postgate.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/postgate.ts index 659b5423b13..c1e135b4961 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/postgate.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/postgate.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.feed.postgate' export interface Record { + $type?: 'app.bsky.feed.postgate' | 'app.bsky.feed.postgate#main' createdAt: string /** Reference (AT-URI) to the post record. */ post: string @@ -30,7 +31,7 @@ export function validateRecord(v: unknown) { /** Disables embedding of this post. */ export interface DisableRule { - [k: string]: unknown + $type?: 'app.bsky.feed.postgate#disableRule' } export function isDisableRule(v: unknown): v is DisableRule & { diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/repost.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/repost.ts index baec71ae29b..3397c9db6e6 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/repost.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/repost.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.feed.repost' export interface Record { + $type?: 'app.bsky.feed.repost' | 'app.bsky.feed.repost#main' subject: ComAtprotoRepoStrongRef.Main createdAt: string [k: string]: unknown diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/searchPosts.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/searchPosts.ts index 9e8c6f2950c..e86fc686920 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/searchPosts.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/searchPosts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -44,7 +44,6 @@ export interface OutputSchema { /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ hitsTotal?: number posts: AppBskyFeedDefs.PostView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/sendInteractions.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/sendInteractions.ts index 793af1b716a..dc7fa7669ae 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/sendInteractions.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/sendInteractions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -15,12 +15,9 @@ export interface QueryParams {} export interface InputSchema { interactions: AppBskyFeedDefs.Interaction[] - [k: string]: unknown } -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export interface HandlerInput { encoding: 'application/json' diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/threadgate.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/threadgate.ts index cd424007087..1a776d4456a 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/threadgate.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/threadgate.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.feed.threadgate' export interface Record { + $type?: 'app.bsky.feed.threadgate' | 'app.bsky.feed.threadgate#main' /** Reference (AT-URI) to the post record. */ post: string allow?: ( @@ -35,7 +36,7 @@ export function validateRecord(v: unknown) { /** Allow replies from actors mentioned in your post. */ export interface MentionRule { - [k: string]: unknown + $type?: 'app.bsky.feed.threadgate#mentionRule' } export function isMentionRule(v: unknown): v is MentionRule & { @@ -53,7 +54,7 @@ export function validateMentionRule(v: unknown) { /** Allow replies from actors you follow. */ export interface FollowingRule { - [k: string]: unknown + $type?: 'app.bsky.feed.threadgate#followingRule' } export function isFollowingRule(v: unknown): v is FollowingRule & { @@ -71,8 +72,8 @@ export function validateFollowingRule(v: unknown) { /** Allow replies from actors on a list. */ export interface ListRule { + $type?: 'app.bsky.feed.threadgate#listRule' list: string - [k: string]: unknown } export function isListRule( diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/block.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/block.ts index 79f0c46305b..1575db8242f 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/block.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/block.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.graph.block' export interface Record { + $type?: 'app.bsky.graph.block' | 'app.bsky.graph.block#main' /** DID of the account to be blocked. */ subject: string createdAt: string diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/defs.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/defs.ts index 4f2e53f6c5f..d7b85120a8c 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/defs.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' import * as AppBskyActorDefs from '../actor/defs' import * as AppBskyRichtextFacet from '../richtext/facet' @@ -13,6 +13,7 @@ import * as AppBskyFeedDefs from '../feed/defs' export const id = 'app.bsky.graph.defs' export interface ListViewBasic { + $type?: 'app.bsky.graph.defs#listViewBasic' uri: string cid: string name: string @@ -22,7 +23,6 @@ export interface ListViewBasic { labels?: ComAtprotoLabelDefs.Label[] viewer?: ListViewerState indexedAt?: string - [k: string]: unknown } export function isListViewBasic(v: unknown): v is ListViewBasic & { @@ -39,6 +39,7 @@ export function validateListViewBasic(v: unknown) { } export interface ListView { + $type?: 'app.bsky.graph.defs#listView' uri: string cid: string creator: AppBskyActorDefs.ProfileView @@ -51,7 +52,6 @@ export interface ListView { labels?: ComAtprotoLabelDefs.Label[] viewer?: ListViewerState indexedAt: string - [k: string]: unknown } export function isListView( @@ -65,9 +65,9 @@ export function validateListView(v: unknown) { } export interface ListItemView { + $type?: 'app.bsky.graph.defs#listItemView' uri: string subject: AppBskyActorDefs.ProfileView - [k: string]: unknown } export function isListItemView( @@ -84,9 +84,10 @@ export function validateListItemView(v: unknown) { } export interface StarterPackView { + $type?: 'app.bsky.graph.defs#starterPackView' uri: string cid: string - record: {} + record: { [_ in string]: unknown } creator: AppBskyActorDefs.ProfileViewBasic list?: ListViewBasic listItemsSample?: ListItemView[] @@ -95,7 +96,6 @@ export interface StarterPackView { joinedAllTimeCount?: number labels?: ComAtprotoLabelDefs.Label[] indexedAt: string - [k: string]: unknown } export function isStarterPackView(v: unknown): v is StarterPackView & { @@ -112,16 +112,16 @@ export function validateStarterPackView(v: unknown) { } export interface StarterPackViewBasic { + $type?: 'app.bsky.graph.defs#starterPackViewBasic' uri: string cid: string - record: {} + record: { [_ in string]: unknown } creator: AppBskyActorDefs.ProfileViewBasic listItemCount?: number joinedWeekCount?: number joinedAllTimeCount?: number labels?: ComAtprotoLabelDefs.Label[] indexedAt: string - [k: string]: unknown } export function isStarterPackViewBasic( @@ -153,9 +153,9 @@ export const CURATELIST = 'app.bsky.graph.defs#curatelist' export const REFERENCELIST = 'app.bsky.graph.defs#referencelist' export interface ListViewerState { + $type?: 'app.bsky.graph.defs#listViewerState' muted?: boolean blocked?: string - [k: string]: unknown } export function isListViewerState(v: unknown): v is ListViewerState & { @@ -173,9 +173,9 @@ export function validateListViewerState(v: unknown) { /** indicates that a handle or DID could not be resolved */ export interface NotFoundActor { + $type?: 'app.bsky.graph.defs#notFoundActor' actor: string notFound: true - [k: string]: unknown } export function isNotFoundActor(v: unknown): v is NotFoundActor & { @@ -193,12 +193,12 @@ export function validateNotFoundActor(v: unknown) { /** 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 - [k: string]: unknown } export function isRelationship( diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/follow.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/follow.ts index 7da79cb6f6d..97da4da5437 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/follow.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/follow.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.graph.follow' export interface Record { + $type?: 'app.bsky.graph.follow' | 'app.bsky.graph.follow#main' subject: string createdAt: string [k: string]: unknown diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts index b43fa3f0e67..edae888075b 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string starterPacks: AppBskyGraphDefs.StarterPackViewBasic[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getBlocks.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getBlocks.ts index 97002ce1352..208512babca 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getBlocks.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getBlocks.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string blocks: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getFollowers.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getFollowers.ts index cbc561800b4..0004ccee43d 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getFollowers.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getFollowers.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -23,7 +23,6 @@ export interface OutputSchema { subject: AppBskyActorDefs.ProfileView cursor?: string followers: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getFollows.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getFollows.ts index 993a8fa5219..b41e25b6952 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getFollows.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getFollows.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -23,7 +23,6 @@ export interface OutputSchema { subject: AppBskyActorDefs.ProfileView cursor?: string follows: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts index 125939471e5..a225bd1ab34 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -23,7 +23,6 @@ export interface OutputSchema { subject: AppBskyActorDefs.ProfileView cursor?: string followers: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getList.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getList.ts index 1bbd4682300..5dba8af7234 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getList.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getList.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -24,7 +24,6 @@ export interface OutputSchema { cursor?: string list: AppBskyGraphDefs.ListView items: AppBskyGraphDefs.ListItemView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getListBlocks.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getListBlocks.ts index 4db65c33f29..efe19f9d420 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getListBlocks.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getListBlocks.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string lists: AppBskyGraphDefs.ListView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getListMutes.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getListMutes.ts index 59c1b6fe073..fee69ac07b8 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getListMutes.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getListMutes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string lists: AppBskyGraphDefs.ListView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getLists.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getLists.ts index 1b343188801..22db439e198 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getLists.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getLists.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string lists: AppBskyGraphDefs.ListView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getMutes.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getMutes.ts index d3d85056d5e..74921f90b0b 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getMutes.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getMutes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string mutes: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getRelationships.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getRelationships.ts index 1349f8a5bbf..eed1299cb69 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getRelationships.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getRelationships.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -27,7 +27,6 @@ export interface OutputSchema { | AppBskyGraphDefs.NotFoundActor | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getStarterPack.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getStarterPack.ts index 741176f0773..81bf23e8620 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getStarterPack.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getStarterPack.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { starterPack: AppBskyGraphDefs.StarterPackView - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getStarterPacks.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getStarterPacks.ts index 595ea704853..64e3cac88c2 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getStarterPacks.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getStarterPacks.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { starterPacks: AppBskyGraphDefs.StarterPackViewBasic[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts index 9aca4fc8c44..456997eba45 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -21,7 +21,6 @@ export interface OutputSchema { suggestions: AppBskyActorDefs.ProfileView[] /** If true, response has fallen-back to generic results, and is not scoped using relativeToDid */ isFallback?: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/list.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/list.ts index 4a5af8012f7..f00aaa02f5a 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/list.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/list.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyGraphDefs from './defs' import * as AppBskyRichtextFacet from '../richtext/facet' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' @@ -12,6 +12,7 @@ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.graph.list' export interface Record { + $type?: 'app.bsky.graph.list' | 'app.bsky.graph.list#main' purpose: AppBskyGraphDefs.ListPurpose /** Display name for list; can not be empty. */ name: string diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/listblock.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/listblock.ts index a1699eba67a..713cbba4269 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/listblock.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/listblock.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.graph.listblock' export interface Record { + $type?: 'app.bsky.graph.listblock' | 'app.bsky.graph.listblock#main' /** Reference (AT-URI) to the mod list record. */ subject: string createdAt: string diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/listitem.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/listitem.ts index 9be8287ce0e..08e8e4f5543 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/listitem.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/listitem.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.graph.listitem' export interface Record { + $type?: 'app.bsky.graph.listitem' | 'app.bsky.graph.listitem#main' /** The account which is included on the list. */ subject: string /** Reference (AT-URI) to the list record (app.bsky.graph.list). */ diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/muteActor.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/muteActor.ts index 302c7d4879a..92af6cda1d2 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/muteActor.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/muteActor.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.muteActor' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { actor: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/muteActorList.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/muteActorList.ts index 7e1d9d7e727..24abc1eaa8b 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/muteActorList.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/muteActorList.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.muteActorList' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { list: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/muteThread.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/muteThread.ts index 97b2937fb39..3bad99cbdbb 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/muteThread.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/muteThread.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.muteThread' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { root: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/starterpack.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/starterpack.ts index 0bfcb427ed3..5cb2a2e1c26 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/starterpack.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/starterpack.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyRichtextFacet from '../richtext/facet' export const id = 'app.bsky.graph.starterpack' export interface Record { + $type?: 'app.bsky.graph.starterpack' | 'app.bsky.graph.starterpack#main' /** Display name for starter pack; can not be empty. */ name: string description?: string @@ -32,8 +33,8 @@ export function validateRecord(v: unknown) { } export interface FeedItem { + $type?: 'app.bsky.graph.starterpack#feedItem' uri: string - [k: string]: unknown } export function isFeedItem( diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/unmuteActor.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/unmuteActor.ts index 77bb88083da..2d9feb63f5c 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/unmuteActor.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/unmuteActor.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.unmuteActor' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { actor: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/unmuteActorList.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/unmuteActorList.ts index 04a03b76764..583b5a38daa 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/unmuteActorList.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/unmuteActorList.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.unmuteActorList' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { list: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/app/bsky/graph/unmuteThread.ts b/packages/ozone/src/lexicon/types/app/bsky/graph/unmuteThread.ts index 90e9234cda5..fce07aaa3e9 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/graph/unmuteThread.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/graph/unmuteThread.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.unmuteThread' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { root: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/app/bsky/labeler/defs.ts b/packages/ozone/src/lexicon/types/app/bsky/labeler/defs.ts index 02973fb6b9e..83ac570a432 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/labeler/defs.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/labeler/defs.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyActorDefs from '../actor/defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.labeler.defs' export interface LabelerView { + $type?: 'app.bsky.labeler.defs#labelerView' uri: string cid: string creator: AppBskyActorDefs.ProfileView @@ -18,7 +19,6 @@ export interface LabelerView { viewer?: LabelerViewerState indexedAt: string labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isLabelerView( @@ -35,6 +35,7 @@ export function validateLabelerView(v: unknown) { } export interface LabelerViewDetailed { + $type?: 'app.bsky.labeler.defs#labelerViewDetailed' uri: string cid: string creator: AppBskyActorDefs.ProfileView @@ -43,7 +44,6 @@ export interface LabelerViewDetailed { viewer?: LabelerViewerState indexedAt: string labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isLabelerViewDetailed(v: unknown): v is LabelerViewDetailed & { @@ -60,8 +60,8 @@ export function validateLabelerViewDetailed(v: unknown) { } export interface LabelerViewerState { + $type?: 'app.bsky.labeler.defs#labelerViewerState' like?: string - [k: string]: unknown } export function isLabelerViewerState(v: unknown): v is LabelerViewerState & { @@ -78,11 +78,11 @@ export function validateLabelerViewerState(v: unknown) { } 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[] - [k: string]: unknown } export function isLabelerPolicies(v: unknown): v is LabelerPolicies & { diff --git a/packages/ozone/src/lexicon/types/app/bsky/labeler/getServices.ts b/packages/ozone/src/lexicon/types/app/bsky/labeler/getServices.ts index dcc29c5f73f..aca7c6c61d3 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/labeler/getServices.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/labeler/getServices.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyLabelerDefs from './defs' @@ -24,7 +24,6 @@ export interface OutputSchema { | AppBskyLabelerDefs.LabelerViewDetailed | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/labeler/service.ts b/packages/ozone/src/lexicon/types/app/bsky/labeler/service.ts index 8b91f65c304..82324693664 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/labeler/service.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/labeler/service.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyLabelerDefs from './defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.labeler.service' export interface Record { + $type?: 'app.bsky.labeler.service' | 'app.bsky.labeler.service#main' policies: AppBskyLabelerDefs.LabelerPolicies labels?: | ComAtprotoLabelDefs.SelfLabels diff --git a/packages/ozone/src/lexicon/types/app/bsky/notification/getUnreadCount.ts b/packages/ozone/src/lexicon/types/app/bsky/notification/getUnreadCount.ts index 37eac1bd1f1..9f3992a91c8 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/notification/getUnreadCount.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/notification/getUnreadCount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.notification.getUnreadCount' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { count: number - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/notification/listNotifications.ts b/packages/ozone/src/lexicon/types/app/bsky/notification/listNotifications.ts index d4b68653ca5..0d8c35658af 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/notification/listNotifications.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/notification/listNotifications.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' @@ -26,7 +26,6 @@ export interface OutputSchema { notifications: Notification[] priority?: boolean seenAt?: string - [k: string]: unknown } export type HandlerInput = undefined @@ -55,6 +54,7 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Notification { + $type?: 'app.bsky.notification.listNotifications#notification' uri: string cid: string author: AppBskyActorDefs.ProfileView @@ -69,11 +69,10 @@ export interface Notification { | 'starterpack-joined' | (string & {}) reasonSubject?: string - record: {} + record: { [_ in string]: unknown } isRead: boolean indexedAt: string labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isNotification(v: unknown): v is Notification & { diff --git a/packages/ozone/src/lexicon/types/app/bsky/notification/putPreferences.ts b/packages/ozone/src/lexicon/types/app/bsky/notification/putPreferences.ts index ad2f6aa4226..5ff2b706722 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/notification/putPreferences.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/notification/putPreferences.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.notification.putPreferences' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { priority: boolean - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/app/bsky/notification/registerPush.ts b/packages/ozone/src/lexicon/types/app/bsky/notification/registerPush.ts index 3ffdf1b7b4f..7c7de7e2450 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/notification/registerPush.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/notification/registerPush.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.notification.registerPush' @@ -17,7 +17,6 @@ export interface InputSchema { token: string platform: 'ios' | 'android' | 'web' | (string & {}) appId: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/app/bsky/notification/updateSeen.ts b/packages/ozone/src/lexicon/types/app/bsky/notification/updateSeen.ts index 1fbd2fe680c..f600ba2b573 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/notification/updateSeen.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/notification/updateSeen.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.notification.updateSeen' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { seenAt: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/app/bsky/richtext/facet.ts b/packages/ozone/src/lexicon/types/app/bsky/richtext/facet.ts index 339f2fa2739..2fc31719525 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/richtext/facet.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/richtext/facet.ts @@ -4,15 +4,15 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.richtext.facet' /** Annotation of a sub-string within rich text. */ export interface Main { + $type?: 'app.bsky.richtext.facet' | 'app.bsky.richtext.facet#main' index: ByteSlice features: (Mention | Link | Tag | { $type: string; [k: string]: unknown })[] - [k: string]: unknown } export function isMain( @@ -27,8 +27,8 @@ export function validateMain(v: unknown) { /** 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 - [k: string]: unknown } export function isMention( @@ -43,8 +43,8 @@ export function validateMention(v: unknown) { /** 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 - [k: string]: unknown } export function isLink( @@ -59,8 +59,8 @@ export function validateLink(v: unknown) { /** 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 - [k: string]: unknown } export function isTag( @@ -75,9 +75,9 @@ export function validateTag(v: unknown) { /** 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 - [k: string]: unknown } export function isByteSlice( diff --git a/packages/ozone/src/lexicon/types/app/bsky/unspecced/defs.ts b/packages/ozone/src/lexicon/types/app/bsky/unspecced/defs.ts index f6fb3ac74d4..c5cde2205f4 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/unspecced/defs.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/unspecced/defs.ts @@ -4,13 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.unspecced.defs' export interface SkeletonSearchPost { + $type?: 'app.bsky.unspecced.defs#skeletonSearchPost' uri: string - [k: string]: unknown } export function isSkeletonSearchPost(v: unknown): v is SkeletonSearchPost & { @@ -27,8 +27,8 @@ export function validateSkeletonSearchPost(v: unknown) { } export interface SkeletonSearchActor { + $type?: 'app.bsky.unspecced.defs#skeletonSearchActor' did: string - [k: string]: unknown } export function isSkeletonSearchActor(v: unknown): v is SkeletonSearchActor & { diff --git a/packages/ozone/src/lexicon/types/app/bsky/unspecced/getConfig.ts b/packages/ozone/src/lexicon/types/app/bsky/unspecced/getConfig.ts index 78dbbe4e854..17459f72b3c 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/unspecced/getConfig.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/unspecced/getConfig.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.unspecced.getConfig' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { checkEmailConfirmed?: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts b/packages/ozone/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts index 07b21eb7514..cfcebf099bf 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from '../feed/defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts b/packages/ozone/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts index adae4cbe67a..33ee7b00cbe 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyUnspeccedDefs from './defs' @@ -27,7 +27,6 @@ export interface OutputSchema { 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 - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts b/packages/ozone/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts index b7f9be1a008..9afa5d4d5f5 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.unspecced.getTaggedSuggestions' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { suggestions: Suggestion[] - [k: string]: unknown } export type HandlerInput = undefined @@ -45,10 +44,10 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Suggestion { + $type?: 'app.bsky.unspecced.getTaggedSuggestions#suggestion' tag: string subjectType: 'actor' | 'feed' | (string & {}) subject: string - [k: string]: unknown } export function isSuggestion(v: unknown): v is Suggestion & { diff --git a/packages/ozone/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts b/packages/ozone/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts index 9187623dab8..98eaccf12d7 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyUnspeccedDefs from './defs' @@ -30,7 +30,6 @@ export interface OutputSchema { /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ hitsTotal?: number actors: AppBskyUnspeccedDefs.SkeletonSearchActor[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts b/packages/ozone/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts index f0c33731dfe..41425088a3d 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyUnspeccedDefs from './defs' @@ -46,7 +46,6 @@ export interface OutputSchema { /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ hitsTotal?: number posts: AppBskyUnspeccedDefs.SkeletonSearchPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/video/defs.ts b/packages/ozone/src/lexicon/types/app/bsky/video/defs.ts index 3a709ce65ad..9c94df560db 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/video/defs.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/video/defs.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export 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. */ @@ -18,7 +19,6 @@ export interface JobStatus { blob?: BlobRef error?: string message?: string - [k: string]: unknown } export function isJobStatus( diff --git a/packages/ozone/src/lexicon/types/app/bsky/video/getJobStatus.ts b/packages/ozone/src/lexicon/types/app/bsky/video/getJobStatus.ts index f2479a16d50..b42395ca1e2 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/video/getJobStatus.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/video/getJobStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyVideoDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { jobStatus: AppBskyVideoDefs.JobStatus - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/video/getUploadLimits.ts b/packages/ozone/src/lexicon/types/app/bsky/video/getUploadLimits.ts index cf280f19737..84faac95ab5 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/video/getUploadLimits.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/video/getUploadLimits.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.video.getUploadLimits' @@ -20,7 +20,6 @@ export interface OutputSchema { remainingDailyBytes?: number message?: string error?: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/app/bsky/video/uploadVideo.ts b/packages/ozone/src/lexicon/types/app/bsky/video/uploadVideo.ts index 8de7d0595fe..8900d9f285a 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/video/uploadVideo.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/video/uploadVideo.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyVideoDefs from './defs' @@ -18,7 +18,6 @@ export type InputSchema = string | Uint8Array | Blob export interface OutputSchema { jobStatus: AppBskyVideoDefs.JobStatus - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/chat/bsky/actor/declaration.ts b/packages/ozone/src/lexicon/types/chat/bsky/actor/declaration.ts index 7314ce3f777..8728c035dce 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/actor/declaration.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/actor/declaration.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'chat.bsky.actor.declaration' export interface Record { + $type?: 'chat.bsky.actor.declaration' | 'chat.bsky.actor.declaration#main' allowIncoming: 'all' | 'none' | 'following' | (string & {}) [k: string]: unknown } diff --git a/packages/ozone/src/lexicon/types/chat/bsky/actor/defs.ts b/packages/ozone/src/lexicon/types/chat/bsky/actor/defs.ts index e53389afa10..7127a0c2061 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/actor/defs.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/actor/defs.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyActorDefs from '../../../app/bsky/actor/defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'chat.bsky.actor.defs' export interface ProfileViewBasic { + $type?: 'chat.bsky.actor.defs#profileViewBasic' did: string handle: string displayName?: string @@ -20,7 +21,6 @@ export interface ProfileViewBasic { labels?: ComAtprotoLabelDefs.Label[] /** Set to true when the actor cannot actively participate in converations */ chatDisabled?: boolean - [k: string]: unknown } export function isProfileViewBasic(v: unknown): v is ProfileViewBasic & { diff --git a/packages/ozone/src/lexicon/types/chat/bsky/actor/deleteAccount.ts b/packages/ozone/src/lexicon/types/chat/bsky/actor/deleteAccount.ts index 23e9e3572bf..fe776d7c8bf 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/actor/deleteAccount.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/actor/deleteAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.actor.deleteAccount' @@ -14,9 +14,7 @@ export interface QueryParams {} export type InputSchema = undefined -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/chat/bsky/actor/exportAccountData.ts b/packages/ozone/src/lexicon/types/chat/bsky/actor/exportAccountData.ts index 44aa74540b1..ce29bfcefcb 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/actor/exportAccountData.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/actor/exportAccountData.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.actor.exportAccountData' diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/defs.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/defs.ts index 29da4f1ed94..4ccc43f11e5 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/defs.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyRichtextFacet from '../../../app/bsky/richtext/facet' import * as AppBskyEmbedRecord from '../../../app/bsky/embed/record' import * as ChatBskyActorDefs from '../actor/defs' @@ -12,10 +12,10 @@ import * as ChatBskyActorDefs from '../actor/defs' export const id = 'chat.bsky.convo.defs' export interface MessageRef { + $type?: 'chat.bsky.convo.defs#messageRef' did: string convoId: string messageId: string - [k: string]: unknown } export function isMessageRef( @@ -32,11 +32,11 @@ export function validateMessageRef(v: unknown) { } export interface MessageInput { + $type?: 'chat.bsky.convo.defs#messageInput' text: string /** Annotations of text (mentions, URLs, hashtags, etc) */ facets?: AppBskyRichtextFacet.Main[] embed?: AppBskyEmbedRecord.Main | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isMessageInput(v: unknown): v is MessageInput & { @@ -53,6 +53,7 @@ export function validateMessageInput(v: unknown) { } export interface MessageView { + $type?: 'chat.bsky.convo.defs#messageView' id: string rev: string text: string @@ -61,7 +62,6 @@ export interface MessageView { embed?: AppBskyEmbedRecord.View | { $type: string; [k: string]: unknown } sender: MessageViewSender sentAt: string - [k: string]: unknown } export function isMessageView( @@ -78,11 +78,11 @@ export function validateMessageView(v: unknown) { } export interface DeletedMessageView { + $type?: 'chat.bsky.convo.defs#deletedMessageView' id: string rev: string sender: MessageViewSender sentAt: string - [k: string]: unknown } export function isDeletedMessageView(v: unknown): v is DeletedMessageView & { @@ -99,8 +99,8 @@ export function validateDeletedMessageView(v: unknown) { } export interface MessageViewSender { + $type?: 'chat.bsky.convo.defs#messageViewSender' did: string - [k: string]: unknown } export function isMessageViewSender(v: unknown): v is MessageViewSender & { @@ -117,6 +117,7 @@ export function validateMessageViewSender(v: unknown) { } export interface ConvoView { + $type?: 'chat.bsky.convo.defs#convoView' id: string rev: string members: ChatBskyActorDefs.ProfileViewBasic[] @@ -127,7 +128,6 @@ export interface ConvoView { muted: boolean opened?: boolean unreadCount: number - [k: string]: unknown } export function isConvoView( @@ -141,9 +141,9 @@ export function validateConvoView(v: unknown) { } export interface LogBeginConvo { + $type?: 'chat.bsky.convo.defs#logBeginConvo' rev: string convoId: string - [k: string]: unknown } export function isLogBeginConvo(v: unknown): v is LogBeginConvo & { @@ -160,9 +160,9 @@ export function validateLogBeginConvo(v: unknown) { } export interface LogLeaveConvo { + $type?: 'chat.bsky.convo.defs#logLeaveConvo' rev: string convoId: string - [k: string]: unknown } export function isLogLeaveConvo(v: unknown): v is LogLeaveConvo & { @@ -179,13 +179,13 @@ export function validateLogLeaveConvo(v: unknown) { } export interface LogCreateMessage { + $type?: 'chat.bsky.convo.defs#logCreateMessage' rev: string convoId: string message: | MessageView | DeletedMessageView | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isLogCreateMessage(v: unknown): v is LogCreateMessage & { @@ -202,13 +202,13 @@ export function validateLogCreateMessage(v: unknown) { } export interface LogDeleteMessage { + $type?: 'chat.bsky.convo.defs#logDeleteMessage' rev: string convoId: string message: | MessageView | DeletedMessageView | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isLogDeleteMessage(v: unknown): v is LogDeleteMessage & { diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts index 3097dda17b7..29dca72f0d8 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -16,7 +16,6 @@ export interface QueryParams {} export interface InputSchema { convoId: string messageId: string - [k: string]: unknown } export type OutputSchema = ChatBskyConvoDefs.DeletedMessageView diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/getConvo.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/getConvo.ts index a0da707e4e3..62748ac8f5e 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/getConvo.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/getConvo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts index 3037df3634e..1dd9bf51e12 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/getLog.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/getLog.ts index e9e46c404f6..a3608e9b4bb 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/getLog.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/getLog.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -26,7 +26,6 @@ export interface OutputSchema { | ChatBskyConvoDefs.LogDeleteMessage | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/getMessages.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/getMessages.ts index a52f1e6273a..2c82e079299 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/getMessages.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/getMessages.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -26,7 +26,6 @@ export interface OutputSchema { | ChatBskyConvoDefs.DeletedMessageView | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/leaveConvo.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/leaveConvo.ts index 35b3789c53d..5d3caeb971b 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/leaveConvo.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/leaveConvo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.convo.leaveConvo' @@ -14,13 +14,11 @@ export interface QueryParams {} export interface InputSchema { convoId: string - [k: string]: unknown } export interface OutputSchema { convoId: string rev: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/listConvos.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/listConvos.ts index 29686f9e22e..218ac63024d 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/listConvos.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/listConvos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string convos: ChatBskyConvoDefs.ConvoView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/muteConvo.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/muteConvo.ts index 9259e02d05e..2cd58fb188c 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/muteConvo.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/muteConvo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { convoId: string - [k: string]: unknown } export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/sendMessage.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/sendMessage.ts index 220d415fc86..703bf2eb67e 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/sendMessage.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/sendMessage.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -16,7 +16,6 @@ export interface QueryParams {} export interface InputSchema { convoId: string message: ChatBskyConvoDefs.MessageInput - [k: string]: unknown } export type OutputSchema = ChatBskyConvoDefs.MessageView diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts index 78b65e9218b..c1efbff74b3 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { items: BatchItem[] - [k: string]: unknown } export interface OutputSchema { items: ChatBskyConvoDefs.MessageView[] - [k: string]: unknown } export interface HandlerInput { @@ -52,9 +50,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface BatchItem { + $type?: 'chat.bsky.convo.sendMessageBatch#batchItem' convoId: string message: ChatBskyConvoDefs.MessageInput - [k: string]: unknown } export function isBatchItem(v: unknown): v is BatchItem & { diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts index c27b96de1d6..ad8108d63b4 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { convoId: string - [k: string]: unknown } export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/chat/bsky/convo/updateRead.ts b/packages/ozone/src/lexicon/types/chat/bsky/convo/updateRead.ts index ff79b5b9b57..b505ff08c30 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/convo/updateRead.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/convo/updateRead.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -16,12 +16,10 @@ export interface QueryParams {} export interface InputSchema { convoId: string messageId?: string - [k: string]: unknown } export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts b/packages/ozone/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts index 50e3605a964..29872766060 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.moderation.getActorMetadata' @@ -20,7 +20,6 @@ export interface OutputSchema { day: Metadata month: Metadata all: Metadata - [k: string]: unknown } export type HandlerInput = undefined @@ -49,11 +48,11 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Metadata { + $type?: 'chat.bsky.moderation.getActorMetadata#metadata' messagesSent: number messagesReceived: number convos: number convosStarted: number - [k: string]: unknown } export function isMetadata(v: unknown): v is Metadata & { diff --git a/packages/ozone/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts b/packages/ozone/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts index 127d408e0fa..71de12b77aa 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from '../convo/defs' @@ -27,7 +27,6 @@ export interface OutputSchema { | ChatBskyConvoDefs.DeletedMessageView | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts b/packages/ozone/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts index 355c7968ff1..feef56ddb2d 100644 --- a/packages/ozone/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts +++ b/packages/ozone/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.moderation.updateActorAccess' @@ -16,7 +16,6 @@ export interface InputSchema { actor: string allowAccess: boolean ref?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/defs.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/defs.ts index e9e29643b81..e43ce333edf 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/defs.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/defs.ts @@ -4,15 +4,15 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoServerDefs from '../server/defs' export const id = 'com.atproto.admin.defs' export interface StatusAttr { + $type?: 'com.atproto.admin.defs#statusAttr' applied: boolean ref?: string - [k: string]: unknown } export function isStatusAttr( @@ -29,10 +29,11 @@ export function validateStatusAttr(v: unknown) { } export interface AccountView { + $type?: 'com.atproto.admin.defs#accountView' did: string handle: string email?: string - relatedRecords?: {}[] + relatedRecords?: { [_ in string]: unknown }[] indexedAt: string invitedBy?: ComAtprotoServerDefs.InviteCode invites?: ComAtprotoServerDefs.InviteCode[] @@ -41,7 +42,6 @@ export interface AccountView { inviteNote?: string deactivatedAt?: string threatSignatures?: ThreatSignature[] - [k: string]: unknown } export function isAccountView(v: unknown): v is AccountView & { @@ -58,8 +58,8 @@ export function validateAccountView(v: unknown) { } export interface RepoRef { + $type?: 'com.atproto.admin.defs#repoRef' did: string - [k: string]: unknown } export function isRepoRef( @@ -73,10 +73,10 @@ export function validateRepoRef(v: unknown) { } export interface RepoBlobRef { + $type?: 'com.atproto.admin.defs#repoBlobRef' did: string cid: string recordUri?: string - [k: string]: unknown } export function isRepoBlobRef(v: unknown): v is RepoBlobRef & { @@ -93,9 +93,9 @@ export function validateRepoBlobRef(v: unknown) { } export interface ThreatSignature { + $type?: 'com.atproto.admin.defs#threatSignature' property: string value: string - [k: string]: unknown } export function isThreatSignature(v: unknown): v is ThreatSignature & { diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/deleteAccount.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/deleteAccount.ts index 10c10e11479..b89f7b3ef7b 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/deleteAccount.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/deleteAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.deleteAccount' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { did: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts index 4f32510bcc4..7e6489f0bfc 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.disableAccountInvites' @@ -16,7 +16,6 @@ export interface InputSchema { account: string /** Optional reason for disabled invites. */ note?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts index 8a0033e90a1..e1a77bf44b9 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.disableInviteCodes' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { codes?: string[] accounts?: string[] - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts index dc96903fcfc..dbf8968efb6 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.enableAccountInvites' @@ -16,7 +16,6 @@ export interface InputSchema { account: string /** Optional reason for enabled invites. */ note?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/getAccountInfo.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/getAccountInfo.ts index 9c4eab14e8f..dec940a0b05 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/getAccountInfo.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/getAccountInfo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/getAccountInfos.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/getAccountInfos.ts index d979bd557d5..c0fc90e9cd1 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/getAccountInfos.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/getAccountInfos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { infos: ComAtprotoAdminDefs.AccountView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/getInviteCodes.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/getInviteCodes.ts index a39c85de445..80a29cd38a7 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/getInviteCodes.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/getInviteCodes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoServerDefs from '../server/defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string codes: ComAtprotoServerDefs.InviteCode[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts index 517e9789a2f..4397af13aca 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' import * as ComAtprotoRepoStrongRef from '../repo/strongRef' @@ -28,7 +28,6 @@ export interface OutputSchema { | { $type: string; [k: string]: unknown } takedown?: ComAtprotoAdminDefs.StatusAttr deactivated?: ComAtprotoAdminDefs.StatusAttr - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/searchAccounts.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/searchAccounts.ts index 91ff4cbc93f..096bbed018b 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/searchAccounts.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/searchAccounts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string accounts: ComAtprotoAdminDefs.AccountView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/sendEmail.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/sendEmail.ts index b6072bce155..6189455fa53 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/sendEmail.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/sendEmail.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.sendEmail' @@ -19,12 +19,10 @@ export interface InputSchema { 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 - [k: string]: unknown } export interface OutputSchema { sent: boolean - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts index 2dd68717296..4a08416a98c 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.updateAccountEmail' @@ -16,7 +16,6 @@ export interface InputSchema { /** The handle or DID of the repo. */ account: string email: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts index 95cde6f8d48..33e1198fcf4 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.updateAccountHandle' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { did: string handle: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts index ba1ef25f620..5d7dc1233ba 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.updateAccountPassword' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { did: string password: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts b/packages/ozone/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts index ccd44f528cf..63f078b2320 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' import * as ComAtprotoRepoStrongRef from '../repo/strongRef' @@ -22,7 +22,6 @@ export interface InputSchema { | { $type: string; [k: string]: unknown } takedown?: ComAtprotoAdminDefs.StatusAttr deactivated?: ComAtprotoAdminDefs.StatusAttr - [k: string]: unknown } export interface OutputSchema { @@ -32,7 +31,6 @@ export interface OutputSchema { | ComAtprotoAdminDefs.RepoBlobRef | { $type: string; [k: string]: unknown } takedown?: ComAtprotoAdminDefs.StatusAttr - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts b/packages/ozone/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts index d3926404ffe..8a2bee49e07 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.getRecommendedDidCredentials' @@ -18,9 +18,8 @@ export interface OutputSchema { /** Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs. */ rotationKeys?: string[] alsoKnownAs?: string[] - verificationMethods?: {} - services?: {} - [k: string]: unknown + verificationMethods?: { [_ in string]: unknown } + services?: { [_ in string]: unknown } } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts b/packages/ozone/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts index cfe024ea3bd..d1cb7b2e70f 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.requestPlcOperationSignature' diff --git a/packages/ozone/src/lexicon/types/com/atproto/identity/resolveHandle.ts b/packages/ozone/src/lexicon/types/com/atproto/identity/resolveHandle.ts index 3d3accc304e..73872b1d714 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/identity/resolveHandle.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/identity/resolveHandle.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.resolveHandle' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { did: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/identity/signPlcOperation.ts b/packages/ozone/src/lexicon/types/com/atproto/identity/signPlcOperation.ts index 4972bf51d53..df44d2b2f28 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/identity/signPlcOperation.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/identity/signPlcOperation.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.signPlcOperation' @@ -17,15 +17,13 @@ export interface InputSchema { token?: string rotationKeys?: string[] alsoKnownAs?: string[] - verificationMethods?: {} - services?: {} - [k: string]: unknown + verificationMethods?: { [_ in string]: unknown } + services?: { [_ in string]: unknown } } export interface OutputSchema { /** A signed DID PLC operation. */ - operation: {} - [k: string]: unknown + operation: { [_ in string]: unknown } } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts b/packages/ozone/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts index 5c24a9ebe33..82a0b96c67f 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.submitPlcOperation' @@ -13,8 +13,7 @@ export const id = 'com.atproto.identity.submitPlcOperation' export interface QueryParams {} export interface InputSchema { - operation: {} - [k: string]: unknown + operation: { [_ in string]: unknown } } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/identity/updateHandle.ts b/packages/ozone/src/lexicon/types/com/atproto/identity/updateHandle.ts index e34ab1caa01..069b1bcb2ae 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/identity/updateHandle.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/identity/updateHandle.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.updateHandle' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { /** The new handle. */ handle: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/label/defs.ts b/packages/ozone/src/lexicon/types/com/atproto/label/defs.ts index b51ef88d7c2..26114bf4897 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/label/defs.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/label/defs.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export 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. */ @@ -28,7 +29,6 @@ export interface Label { exp?: string /** Signature of dag-cbor encoded label. */ sig?: Uint8Array - [k: string]: unknown } export function isLabel( @@ -43,8 +43,8 @@ export function validateLabel(v: unknown) { /** Metadata tags on an atproto record, published by the author within the record. */ export interface SelfLabels { + $type?: 'com.atproto.label.defs#selfLabels' values: SelfLabel[] - [k: string]: unknown } export function isSelfLabels( @@ -62,9 +62,9 @@ export function validateSelfLabels(v: unknown) { /** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. */ export interface SelfLabel { + $type?: 'com.atproto.label.defs#selfLabel' /** The short string name of the value or type of this label. */ val: string - [k: string]: unknown } export function isSelfLabel( @@ -79,6 +79,7 @@ export function validateSelfLabel(v: unknown) { /** Declares a label value and its expected interpretations and behaviors. */ export interface LabelValueDefinition { + $type?: 'com.atproto.label.defs#labelValueDefinition' /** The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). */ identifier: string /** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. */ @@ -90,7 +91,6 @@ export interface LabelValueDefinition { /** Does the user need to have adult content enabled in order to configure this label? */ adultOnly?: boolean locales: LabelValueDefinitionStrings[] - [k: string]: unknown } export function isLabelValueDefinition( @@ -110,13 +110,13 @@ export function validateLabelValueDefinition(v: unknown) { /** Strings which describe the label in the UI, localized into a specific language. */ export interface LabelValueDefinitionStrings { + $type?: 'com.atproto.label.defs#labelValueDefinitionStrings' /** The code of the language these strings are written in. */ lang: string /** A short human-readable name for the label. */ name: string /** A longer description of what the label means and why it might be applied. */ description: string - [k: string]: unknown } export function isLabelValueDefinitionStrings( diff --git a/packages/ozone/src/lexicon/types/com/atproto/label/queryLabels.ts b/packages/ozone/src/lexicon/types/com/atproto/label/queryLabels.ts index e8d05b18ad3..11d46b522cb 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/label/queryLabels.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/label/queryLabels.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoLabelDefs from './defs' @@ -25,7 +25,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string labels: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/label/subscribeLabels.ts b/packages/ozone/src/lexicon/types/com/atproto/label/subscribeLabels.ts index 71d05b72c3c..a6757ad54df 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/label/subscribeLabels.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/label/subscribeLabels.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, ErrorFrame } from '@atproto/xrpc-server' import { IncomingMessage } from 'http' import * as ComAtprotoLabelDefs from './defs' @@ -33,9 +33,9 @@ export type Handler = ( ) => AsyncIterable export interface Labels { + $type?: 'com.atproto.label.subscribeLabels#labels' seq: number labels: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isLabels(v: unknown): v is Labels & { @@ -49,9 +49,9 @@ export function validateLabels(v: unknown) { } export interface Info { + $type?: 'com.atproto.label.subscribeLabels#info' name: 'OutdatedCursor' | (string & {}) message?: string - [k: string]: unknown } export function isInfo( diff --git a/packages/ozone/src/lexicon/types/com/atproto/moderation/createReport.ts b/packages/ozone/src/lexicon/types/com/atproto/moderation/createReport.ts index 637e305f034..c8ea82a157c 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/moderation/createReport.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/moderation/createReport.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoModerationDefs from './defs' import * as ComAtprotoAdminDefs from '../admin/defs' @@ -23,7 +23,6 @@ export interface InputSchema { | ComAtprotoAdminDefs.RepoRef | ComAtprotoRepoStrongRef.Main | { $type: string; [k: string]: unknown } - [k: string]: unknown } export interface OutputSchema { @@ -36,7 +35,6 @@ export interface OutputSchema { | { $type: string; [k: string]: unknown } reportedBy: string createdAt: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/moderation/defs.ts b/packages/ozone/src/lexicon/types/com/atproto/moderation/defs.ts index 19d3a6afc3a..fc43a9776d9 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/moderation/defs.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/moderation/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'com.atproto.moderation.defs' diff --git a/packages/ozone/src/lexicon/types/com/atproto/repo/applyWrites.ts b/packages/ozone/src/lexicon/types/com/atproto/repo/applyWrites.ts index f0a4a7051dc..b1e8796d166 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/repo/applyWrites.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/repo/applyWrites.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoRepoDefs from './defs' @@ -21,13 +21,11 @@ export interface InputSchema { writes: (Create | Update | Delete)[] /** If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { commit?: ComAtprotoRepoDefs.CommitMeta results?: (CreateResult | UpdateResult | DeleteResult)[] - [k: string]: unknown } export interface HandlerInput { @@ -61,10 +59,10 @@ export type Handler = ( /** Operation which creates a new record. */ export interface Create { + $type?: 'com.atproto.repo.applyWrites#create' collection: string rkey?: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export function isCreate( @@ -79,10 +77,10 @@ export function validateCreate(v: unknown) { /** Operation which updates an existing record. */ export interface Update { + $type?: 'com.atproto.repo.applyWrites#update' collection: string rkey: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export function isUpdate( @@ -97,9 +95,9 @@ export function validateUpdate(v: unknown) { /** Operation which deletes an existing record. */ export interface Delete { + $type?: 'com.atproto.repo.applyWrites#delete' collection: string rkey: string - [k: string]: unknown } export function isDelete( @@ -113,10 +111,10 @@ export function validateDelete(v: unknown) { } export interface CreateResult { + $type?: 'com.atproto.repo.applyWrites#createResult' uri: string cid: string validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export function isCreateResult(v: unknown): v is CreateResult & { @@ -133,10 +131,10 @@ export function validateCreateResult(v: unknown) { } export interface UpdateResult { + $type?: 'com.atproto.repo.applyWrites#updateResult' uri: string cid: string validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export function isUpdateResult(v: unknown): v is UpdateResult & { @@ -153,7 +151,7 @@ export function validateUpdateResult(v: unknown) { } export interface DeleteResult { - [k: string]: unknown + $type?: 'com.atproto.repo.applyWrites#deleteResult' } export function isDeleteResult(v: unknown): v is DeleteResult & { diff --git a/packages/ozone/src/lexicon/types/com/atproto/repo/createRecord.ts b/packages/ozone/src/lexicon/types/com/atproto/repo/createRecord.ts index 492e3048ed4..2f3614bd564 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/repo/createRecord.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/repo/createRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoRepoDefs from './defs' @@ -23,10 +23,9 @@ export interface InputSchema { /** 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. */ validate?: boolean /** The record itself. Must contain a $type field. */ - record: {} + record: { [_ in string]: unknown } /** Compare and swap with the previous commit by CID. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { @@ -34,7 +33,6 @@ export interface OutputSchema { cid: string commit?: ComAtprotoRepoDefs.CommitMeta validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/repo/defs.ts b/packages/ozone/src/lexicon/types/com/atproto/repo/defs.ts index ea541bb4f91..b4667e3ce09 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/repo/defs.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/repo/defs.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'com.atproto.repo.defs' export interface CommitMeta { + $type?: 'com.atproto.repo.defs#commitMeta' cid: string rev: string - [k: string]: unknown } export function isCommitMeta( diff --git a/packages/ozone/src/lexicon/types/com/atproto/repo/deleteRecord.ts b/packages/ozone/src/lexicon/types/com/atproto/repo/deleteRecord.ts index ac54176bb9a..90d6a586362 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/repo/deleteRecord.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/repo/deleteRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoRepoDefs from './defs' @@ -24,12 +24,10 @@ export interface InputSchema { swapRecord?: string /** Compare and swap with the previous commit by CID. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { commit?: ComAtprotoRepoDefs.CommitMeta - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/repo/describeRepo.ts b/packages/ozone/src/lexicon/types/com/atproto/repo/describeRepo.ts index f00bfad6834..4c78cc81d47 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/repo/describeRepo.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/repo/describeRepo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.describeRepo' @@ -21,12 +21,11 @@ export interface OutputSchema { handle: string did: string /** The complete DID document for this account. */ - didDoc: {} + didDoc: { [_ in string]: unknown } /** List of all the collections (NSIDs) for which this repo contains at least one record. */ collections: string[] /** Indicates if handle is currently valid (resolves bi-directionally) */ handleIsCorrect: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/repo/getRecord.ts b/packages/ozone/src/lexicon/types/com/atproto/repo/getRecord.ts index f79ea793e77..bd1a84333c5 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/repo/getRecord.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/repo/getRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.getRecord' @@ -26,8 +26,7 @@ export type InputSchema = undefined export interface OutputSchema { uri: string cid?: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/repo/importRepo.ts b/packages/ozone/src/lexicon/types/com/atproto/repo/importRepo.ts index 51c0d85a347..4054deb37c2 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/repo/importRepo.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/repo/importRepo.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.importRepo' diff --git a/packages/ozone/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts b/packages/ozone/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts index 517ce3e6bc1..0b33fb26306 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.listMissingBlobs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string blobs: RecordBlob[] - [k: string]: unknown } export type HandlerInput = undefined @@ -49,9 +48,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface RecordBlob { + $type?: 'com.atproto.repo.listMissingBlobs#recordBlob' cid: string recordUri: string - [k: string]: unknown } export function isRecordBlob(v: unknown): v is RecordBlob & { diff --git a/packages/ozone/src/lexicon/types/com/atproto/repo/listRecords.ts b/packages/ozone/src/lexicon/types/com/atproto/repo/listRecords.ts index b559aaf3f5c..c46478e5277 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/repo/listRecords.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/repo/listRecords.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.listRecords' @@ -31,7 +31,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string records: Record[] - [k: string]: unknown } export type HandlerInput = undefined @@ -60,10 +59,10 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Record { + $type?: 'com.atproto.repo.listRecords#record' uri: string cid: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export function isRecord( diff --git a/packages/ozone/src/lexicon/types/com/atproto/repo/putRecord.ts b/packages/ozone/src/lexicon/types/com/atproto/repo/putRecord.ts index c5a23a1c583..2b6df533db4 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/repo/putRecord.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/repo/putRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoRepoDefs from './defs' @@ -23,12 +23,11 @@ export interface InputSchema { /** 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. */ validate?: boolean /** The record to write. */ - record: {} + record: { [_ in string]: unknown } /** Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation */ swapRecord?: string | null /** Compare and swap with the previous commit by CID. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { @@ -36,7 +35,6 @@ export interface OutputSchema { cid: string commit?: ComAtprotoRepoDefs.CommitMeta validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/repo/strongRef.ts b/packages/ozone/src/lexicon/types/com/atproto/repo/strongRef.ts index 0afb7bd7fa8..a984a5c929f 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/repo/strongRef.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/repo/strongRef.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'com.atproto.repo.strongRef' export interface Main { + $type?: 'com.atproto.repo.strongRef' | 'com.atproto.repo.strongRef#main' uri: string cid: string - [k: string]: unknown } export function isMain( diff --git a/packages/ozone/src/lexicon/types/com/atproto/repo/uploadBlob.ts b/packages/ozone/src/lexicon/types/com/atproto/repo/uploadBlob.ts index d31911aafe3..2c1852fb9b7 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/repo/uploadBlob.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/repo/uploadBlob.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.uploadBlob' @@ -17,7 +17,6 @@ export type InputSchema = string | Uint8Array | Blob export interface OutputSchema { blob: BlobRef - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/activateAccount.ts b/packages/ozone/src/lexicon/types/com/atproto/server/activateAccount.ts index fcadc8c2e62..e285e773122 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/activateAccount.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/activateAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.activateAccount' diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/checkAccountStatus.ts b/packages/ozone/src/lexicon/types/com/atproto/server/checkAccountStatus.ts index 3d927cd3980..cf1e1390d00 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/checkAccountStatus.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/checkAccountStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.checkAccountStatus' @@ -24,7 +24,6 @@ export interface OutputSchema { privateStateValues: number expectedBlobs: number importedBlobs: number - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/confirmEmail.ts b/packages/ozone/src/lexicon/types/com/atproto/server/confirmEmail.ts index 809a95a216b..d72997ec90a 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/confirmEmail.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/confirmEmail.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.confirmEmail' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { email: string token: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/createAccount.ts b/packages/ozone/src/lexicon/types/com/atproto/server/createAccount.ts index 538e8cb28e7..1b8636d0207 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/createAccount.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/createAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createAccount' @@ -26,8 +26,7 @@ export interface InputSchema { /** DID PLC rotation key (aka, recovery key) to be included in PLC creation operation. */ recoveryKey?: string /** 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. */ - plcOp?: {} - [k: string]: unknown + plcOp?: { [_ in string]: unknown } } /** Account login session returned on successful account creation. */ @@ -38,8 +37,7 @@ export interface OutputSchema { /** The DID of the new account. */ did: string /** Complete DID document. */ - didDoc?: {} - [k: string]: unknown + didDoc?: { [_ in string]: unknown } } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/createAppPassword.ts b/packages/ozone/src/lexicon/types/com/atproto/server/createAppPassword.ts index 22a46eab052..2725e0598b2 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/createAppPassword.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/createAppPassword.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createAppPassword' @@ -17,7 +17,6 @@ export interface InputSchema { name: string /** If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients. */ privileged?: boolean - [k: string]: unknown } export type OutputSchema = AppPassword @@ -52,11 +51,11 @@ export type Handler = ( ) => Promise | HandlerOutput export interface AppPassword { + $type?: 'com.atproto.server.createAppPassword#appPassword' name: string password: string createdAt: string privileged?: boolean - [k: string]: unknown } export function isAppPassword(v: unknown): v is AppPassword & { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/createInviteCode.ts b/packages/ozone/src/lexicon/types/com/atproto/server/createInviteCode.ts index 7ac6989797f..0280eb95aca 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/createInviteCode.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/createInviteCode.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createInviteCode' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { useCount: number forAccount?: string - [k: string]: unknown } export interface OutputSchema { code: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/createInviteCodes.ts b/packages/ozone/src/lexicon/types/com/atproto/server/createInviteCodes.ts index 120d2ae637f..6b88193fe60 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/createInviteCodes.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/createInviteCodes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createInviteCodes' @@ -16,12 +16,10 @@ export interface InputSchema { codeCount: number useCount: number forAccounts?: string[] - [k: string]: unknown } export interface OutputSchema { codes: AccountCodes[] - [k: string]: unknown } export interface HandlerInput { @@ -53,9 +51,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface AccountCodes { + $type?: 'com.atproto.server.createInviteCodes#accountCodes' account: string codes: string[] - [k: string]: unknown } export function isAccountCodes(v: unknown): v is AccountCodes & { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/createSession.ts b/packages/ozone/src/lexicon/types/com/atproto/server/createSession.ts index d2a4cbda1ed..efd3ee603a3 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/createSession.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/createSession.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createSession' @@ -17,7 +17,6 @@ export interface InputSchema { identifier: string password: string authFactorToken?: string - [k: string]: unknown } export interface OutputSchema { @@ -25,14 +24,13 @@ export interface OutputSchema { refreshJwt: string handle: string did: string - didDoc?: {} + didDoc?: { [_ in string]: unknown } email?: string emailConfirmed?: boolean emailAuthFactor?: boolean active?: boolean /** 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. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/deactivateAccount.ts b/packages/ozone/src/lexicon/types/com/atproto/server/deactivateAccount.ts index 0a52f27f203..36bd7a2a97e 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/deactivateAccount.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/deactivateAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.deactivateAccount' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { /** A recommendation to server as to how long they should hold onto the deactivated account before deleting. */ deleteAfter?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/defs.ts b/packages/ozone/src/lexicon/types/com/atproto/server/defs.ts index 1e25a6e6a22..5eb80492ca3 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/defs.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/defs.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'com.atproto.server.defs' export interface InviteCode { + $type?: 'com.atproto.server.defs#inviteCode' code: string available: number disabled: boolean @@ -16,7 +17,6 @@ export interface InviteCode { createdBy: string createdAt: string uses: InviteCodeUse[] - [k: string]: unknown } export function isInviteCode( @@ -33,9 +33,9 @@ export function validateInviteCode(v: unknown) { } export interface InviteCodeUse { + $type?: 'com.atproto.server.defs#inviteCodeUse' usedBy: string usedAt: string - [k: string]: unknown } export function isInviteCodeUse(v: unknown): v is InviteCodeUse & { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/deleteAccount.ts b/packages/ozone/src/lexicon/types/com/atproto/server/deleteAccount.ts index 49fd95f0561..6b1d89fea35 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/deleteAccount.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/deleteAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.deleteAccount' @@ -16,7 +16,6 @@ export interface InputSchema { did: string password: string token: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/deleteSession.ts b/packages/ozone/src/lexicon/types/com/atproto/server/deleteSession.ts index f54d8729338..11cd4281d85 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/deleteSession.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/deleteSession.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.deleteSession' diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/describeServer.ts b/packages/ozone/src/lexicon/types/com/atproto/server/describeServer.ts index ffeeaeaaf73..50f085ac820 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/describeServer.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/describeServer.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.describeServer' @@ -24,7 +24,6 @@ export interface OutputSchema { links?: Links contact?: Contact did: string - [k: string]: unknown } export type HandlerInput = undefined @@ -53,9 +52,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Links { + $type?: 'com.atproto.server.describeServer#links' privacyPolicy?: string termsOfService?: string - [k: string]: unknown } export function isLinks( @@ -69,8 +68,8 @@ export function validateLinks(v: unknown) { } export interface Contact { + $type?: 'com.atproto.server.describeServer#contact' email?: string - [k: string]: unknown } export function isContact(v: unknown): v is Contact & { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts b/packages/ozone/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts index b2d8d3d4bf0..4a653ad2bc3 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoServerDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { codes: ComAtprotoServerDefs.InviteCode[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/getServiceAuth.ts b/packages/ozone/src/lexicon/types/com/atproto/server/getServiceAuth.ts index 3761607e5fc..307b34abc18 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/getServiceAuth.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/getServiceAuth.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.getServiceAuth' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { token: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/getSession.ts b/packages/ozone/src/lexicon/types/com/atproto/server/getSession.ts index 0e135e869f6..24baae80b75 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/getSession.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/getSession.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.getSession' @@ -20,11 +20,10 @@ export interface OutputSchema { email?: string emailConfirmed?: boolean emailAuthFactor?: boolean - didDoc?: {} + didDoc?: { [_ in string]: unknown } active?: boolean /** 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. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/listAppPasswords.ts b/packages/ozone/src/lexicon/types/com/atproto/server/listAppPasswords.ts index daf997f7ad2..ad704069349 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/listAppPasswords.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/listAppPasswords.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.listAppPasswords' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { passwords: AppPassword[] - [k: string]: unknown } export type HandlerInput = undefined @@ -46,10 +45,10 @@ export type Handler = ( ) => Promise | HandlerOutput export interface AppPassword { + $type?: 'com.atproto.server.listAppPasswords#appPassword' name: string createdAt: string privileged?: boolean - [k: string]: unknown } export function isAppPassword(v: unknown): v is AppPassword & { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/refreshSession.ts b/packages/ozone/src/lexicon/types/com/atproto/server/refreshSession.ts index 91d548f3464..07453ff3efe 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/refreshSession.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/refreshSession.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.refreshSession' @@ -19,11 +19,10 @@ export interface OutputSchema { refreshJwt: string handle: string did: string - didDoc?: {} + didDoc?: { [_ in string]: unknown } active?: boolean /** Hosting status of the account. If not specified, then assume 'active'. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/requestAccountDelete.ts b/packages/ozone/src/lexicon/types/com/atproto/server/requestAccountDelete.ts index 5baa557a5f0..b6984683d3d 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/requestAccountDelete.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/requestAccountDelete.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.requestAccountDelete' diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts b/packages/ozone/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts index 21f3ee1b8f5..dc85343724f 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.requestEmailConfirmation' diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts b/packages/ozone/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts index a0e4de30b40..500d16f0221 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.requestEmailUpdate' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { tokenRequired: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/requestPasswordReset.ts b/packages/ozone/src/lexicon/types/com/atproto/server/requestPasswordReset.ts index cbf4ea57211..e60518dade5 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/requestPasswordReset.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/requestPasswordReset.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.requestPasswordReset' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { email: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/reserveSigningKey.ts b/packages/ozone/src/lexicon/types/com/atproto/server/reserveSigningKey.ts index 8042f4c69d0..a2a781136c4 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/reserveSigningKey.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/reserveSigningKey.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.reserveSigningKey' @@ -15,13 +15,11 @@ export interface QueryParams {} export interface InputSchema { /** The DID to reserve a key for. */ did?: string - [k: string]: unknown } export interface OutputSchema { /** The public key for the reserved signing key, in did:key serialization. */ signingKey: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/resetPassword.ts b/packages/ozone/src/lexicon/types/com/atproto/server/resetPassword.ts index 15cf59e86a4..db521bfff8f 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/resetPassword.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/resetPassword.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.resetPassword' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { token: string password: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/revokeAppPassword.ts b/packages/ozone/src/lexicon/types/com/atproto/server/revokeAppPassword.ts index 1cdbf9367d0..c0ab1fb0066 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/revokeAppPassword.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/revokeAppPassword.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.revokeAppPassword' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { name: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/server/updateEmail.ts b/packages/ozone/src/lexicon/types/com/atproto/server/updateEmail.ts index 334d4759c16..814f63c3178 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/server/updateEmail.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/server/updateEmail.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.updateEmail' @@ -17,7 +17,6 @@ export interface InputSchema { emailAuthFactor?: boolean /** Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed. */ token?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/getBlob.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/getBlob.ts index cba9708e6f9..730acfc2649 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/getBlob.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/getBlob.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getBlob' diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/getBlocks.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/getBlocks.ts index f298ef747f9..691aa82f29a 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/getBlocks.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/getBlocks.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getBlocks' diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/getCheckout.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/getCheckout.ts index 724e6908981..446c54b8aa5 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/getCheckout.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/getCheckout.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getCheckout' diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/getHead.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/getHead.ts index e6844bd8014..39d51046db9 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/getHead.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/getHead.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getHead' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { root: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/getLatestCommit.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/getLatestCommit.ts index ea409c07409..e3ace690bbc 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/getLatestCommit.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/getLatestCommit.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getLatestCommit' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cid: string rev: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/getRecord.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/getRecord.ts index e5611bad8e2..5e5c7c3730b 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/getRecord.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/getRecord.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getRecord' diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/getRepo.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/getRepo.ts index 4ec55779c56..93760a523dc 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/getRepo.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/getRepo.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getRepo' diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/getRepoStatus.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/getRepoStatus.ts index 6118cc70510..aea17516b5c 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/getRepoStatus.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/getRepoStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getRepoStatus' @@ -24,7 +24,6 @@ export interface OutputSchema { status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) /** Optional field, the current rev of the repo, if active=true */ rev?: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/listBlobs.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/listBlobs.ts index 0a1149bef5c..c0a4594e640 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/listBlobs.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/listBlobs.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.listBlobs' @@ -24,7 +24,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string cids: string[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/listRepos.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/listRepos.ts index f5802c5b49c..45c4d5a242d 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/listRepos.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/listRepos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.listRepos' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string repos: Repo[] - [k: string]: unknown } export type HandlerInput = undefined @@ -49,6 +48,7 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Repo { + $type?: 'com.atproto.sync.listRepos#repo' did: string /** Current repo commit CID */ head: string @@ -56,7 +56,6 @@ export interface Repo { active?: boolean /** 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. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export function isRepo( diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts index 985d3a91bc0..a514a0581a6 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.notifyOfUpdate' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { /** Hostname of the current service (usually a PDS) that is notifying of update. */ hostname: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/requestCrawl.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/requestCrawl.ts index 48cd29206db..c44c5706def 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/requestCrawl.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/requestCrawl.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.requestCrawl' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { /** Hostname of the current service (eg, PDS) that is requesting to be crawled. */ hostname: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/com/atproto/sync/subscribeRepos.ts b/packages/ozone/src/lexicon/types/com/atproto/sync/subscribeRepos.ts index 5c1e5546c67..e5186fe5173 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/sync/subscribeRepos.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, ErrorFrame } from '@atproto/xrpc-server' import { IncomingMessage } from 'http' @@ -38,6 +38,7 @@ export type Handler = ( /** 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. */ export interface Commit { + $type?: 'com.atproto.sync.subscribeRepos#commit' /** The stream sequence number of this message. */ seq: number /** DEPRECATED -- unused */ @@ -60,7 +61,6 @@ export interface Commit { blobs: CID[] /** Timestamp of when this message was originally broadcast. */ time: string - [k: string]: unknown } export function isCommit( @@ -75,12 +75,12 @@ export function validateCommit(v: unknown) { /** 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. */ export interface Identity { + $type?: 'com.atproto.sync.subscribeRepos#identity' seq: number did: string time: string /** 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. */ handle?: string - [k: string]: unknown } export function isIdentity(v: unknown): v is Identity & { @@ -95,6 +95,7 @@ export function validateIdentity(v: unknown) { /** 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. */ export interface Account { + $type?: 'com.atproto.sync.subscribeRepos#account' seq: number did: string time: string @@ -102,7 +103,6 @@ export interface Account { active: boolean /** If active=false, this optional field indicates a reason for why the account is not active. */ status?: 'takendown' | 'suspended' | 'deleted' | 'deactivated' | (string & {}) - [k: string]: unknown } export function isAccount(v: unknown): v is Account & { @@ -117,11 +117,11 @@ export function validateAccount(v: unknown) { /** DEPRECATED -- Use #identity event instead */ export interface Handle { + $type?: 'com.atproto.sync.subscribeRepos#handle' seq: number did: string handle: string time: string - [k: string]: unknown } export function isHandle( @@ -136,11 +136,11 @@ export function validateHandle(v: unknown) { /** DEPRECATED -- Use #account event instead */ export interface Migrate { + $type?: 'com.atproto.sync.subscribeRepos#migrate' seq: number did: string migrateTo: string | null time: string - [k: string]: unknown } export function isMigrate(v: unknown): v is Migrate & { @@ -155,10 +155,10 @@ export function validateMigrate(v: unknown) { /** DEPRECATED -- Use #account event instead */ export interface Tombstone { + $type?: 'com.atproto.sync.subscribeRepos#tombstone' seq: number did: string time: string - [k: string]: unknown } export function isTombstone(v: unknown): v is Tombstone & { @@ -172,9 +172,9 @@ export function validateTombstone(v: unknown) { } export interface Info { + $type?: 'com.atproto.sync.subscribeRepos#info' name: 'OutdatedCursor' | (string & {}) message?: string - [k: string]: unknown } export function isInfo( @@ -189,11 +189,11 @@ export function validateInfo(v: unknown) { /** A repo operation, ie a mutation of a single record. */ export interface RepoOp { + $type?: 'com.atproto.sync.subscribeRepos#repoOp' action: 'create' | 'update' | 'delete' | (string & {}) path: string /** For creates and updates, the new record CID. For deletions, null. */ cid: CID | null - [k: string]: unknown } export function isRepoOp( diff --git a/packages/ozone/src/lexicon/types/com/atproto/temp/checkSignupQueue.ts b/packages/ozone/src/lexicon/types/com/atproto/temp/checkSignupQueue.ts index 1d459f9b485..e765cb63993 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/temp/checkSignupQueue.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/temp/checkSignupQueue.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.temp.checkSignupQueue' @@ -18,7 +18,6 @@ export interface OutputSchema { activated: boolean placeInQueue?: number estimatedTimeMs?: number - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/temp/fetchLabels.ts b/packages/ozone/src/lexicon/types/com/atproto/temp/fetchLabels.ts index 761449f9989..8f7e99bd241 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/temp/fetchLabels.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/temp/fetchLabels.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoLabelDefs from '../label/defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { labels: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts b/packages/ozone/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts index 365429dca15..6a73668f25c 100644 --- a/packages/ozone/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts +++ b/packages/ozone/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.temp.requestPhoneVerification' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { phoneNumber: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/tools/ozone/communication/createTemplate.ts b/packages/ozone/src/lexicon/types/tools/ozone/communication/createTemplate.ts index c204d4d0966..45443ec0160 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/communication/createTemplate.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/communication/createTemplate.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneCommunicationDefs from './defs' @@ -24,7 +24,6 @@ export interface InputSchema { lang?: string /** DID of the user who is creating the template. */ createdBy?: string - [k: string]: unknown } export type OutputSchema = ToolsOzoneCommunicationDefs.TemplateView diff --git a/packages/ozone/src/lexicon/types/tools/ozone/communication/defs.ts b/packages/ozone/src/lexicon/types/tools/ozone/communication/defs.ts index f3c11f32fab..e6198c68b64 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/communication/defs.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/communication/defs.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'tools.ozone.communication.defs' export interface TemplateView { + $type?: 'tools.ozone.communication.defs#templateView' id: string /** Name of the template. */ name: string @@ -23,7 +24,6 @@ export interface TemplateView { lastUpdatedBy: string createdAt: string updatedAt: string - [k: string]: unknown } export function isTemplateView(v: unknown): v is TemplateView & { diff --git a/packages/ozone/src/lexicon/types/tools/ozone/communication/deleteTemplate.ts b/packages/ozone/src/lexicon/types/tools/ozone/communication/deleteTemplate.ts index a1ceb4fd69c..e1b8ffcb14a 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/communication/deleteTemplate.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/communication/deleteTemplate.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.communication.deleteTemplate' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { id: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/tools/ozone/communication/listTemplates.ts b/packages/ozone/src/lexicon/types/tools/ozone/communication/listTemplates.ts index 7ba4567fce2..1f069cde1d3 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/communication/listTemplates.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/communication/listTemplates.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneCommunicationDefs from './defs' @@ -17,7 +17,6 @@ export type InputSchema = undefined export interface OutputSchema { communicationTemplates: ToolsOzoneCommunicationDefs.TemplateView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/tools/ozone/communication/updateTemplate.ts b/packages/ozone/src/lexicon/types/tools/ozone/communication/updateTemplate.ts index 05b4cee8a92..c7980532853 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/communication/updateTemplate.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/communication/updateTemplate.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneCommunicationDefs from './defs' @@ -27,7 +27,6 @@ export interface InputSchema { /** DID of the user who is updating the template. */ updatedBy?: string disabled?: boolean - [k: string]: unknown } export type OutputSchema = ToolsOzoneCommunicationDefs.TemplateView diff --git a/packages/ozone/src/lexicon/types/tools/ozone/moderation/defs.ts b/packages/ozone/src/lexicon/types/tools/ozone/moderation/defs.ts index 7ce6811a13b..0559d5dd028 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/moderation/defs.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/moderation/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' import * as ChatBskyConvoDefs from '../../../chat/bsky/convo/defs' @@ -15,6 +15,7 @@ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'tools.ozone.moderation.defs' export interface ModEventView { + $type?: 'tools.ozone.moderation.defs#modEventView' id: number event: | ModEventTakedown @@ -46,7 +47,6 @@ export interface ModEventView { createdAt: string creatorHandle?: string subjectHandle?: string - [k: string]: unknown } export function isModEventView(v: unknown): v is ModEventView & { @@ -63,6 +63,7 @@ export function validateModEventView(v: unknown) { } export interface ModEventViewDetail { + $type?: 'tools.ozone.moderation.defs#modEventViewDetail' id: number event: | ModEventTakedown @@ -93,7 +94,6 @@ export interface ModEventViewDetail { subjectBlobs: BlobView[] createdBy: string createdAt: string - [k: string]: unknown } export function isModEventViewDetail(v: unknown): v is ModEventViewDetail & { @@ -110,6 +110,7 @@ export function validateModEventViewDetail(v: unknown) { } export interface SubjectStatusView { + $type?: 'tools.ozone.moderation.defs#subjectStatusView' id: number subject: | ComAtprotoAdminDefs.RepoRef @@ -140,7 +141,6 @@ export interface SubjectStatusView { appealed?: boolean suspendUntil?: string tags?: string[] - [k: string]: unknown } export function isSubjectStatusView(v: unknown): v is SubjectStatusView & { @@ -174,12 +174,12 @@ export const REVIEWNONE = 'tools.ozone.moderation.defs#reviewNone' /** Take down a subject permanently or temporarily */ export interface ModEventTakedown { + $type?: 'tools.ozone.moderation.defs#modEventTakedown' comment?: string /** Indicates how long the takedown should be in effect before automatically expiring. */ durationInHours?: number /** If true, all other reports on content authored by this account will be resolved (acknowledged). */ acknowledgeAccountSubjects?: boolean - [k: string]: unknown } export function isModEventTakedown(v: unknown): v is ModEventTakedown & { @@ -197,9 +197,9 @@ export function validateModEventTakedown(v: unknown) { /** Revert take down action on a subject */ export interface ModEventReverseTakedown { + $type?: 'tools.ozone.moderation.defs#modEventReverseTakedown' /** Describe reasoning behind the reversal. */ comment?: string - [k: string]: unknown } export function isModEventReverseTakedown( @@ -219,9 +219,9 @@ export function validateModEventReverseTakedown(v: unknown) { /** Resolve appeal on a subject */ export interface ModEventResolveAppeal { + $type?: 'tools.ozone.moderation.defs#modEventResolveAppeal' /** Describe resolution. */ comment?: string - [k: string]: unknown } export function isModEventResolveAppeal( @@ -241,10 +241,10 @@ export function validateModEventResolveAppeal(v: unknown) { /** Add a comment to a subject */ export interface ModEventComment { + $type?: 'tools.ozone.moderation.defs#modEventComment' comment: string /** Make the comment persistent on the subject */ sticky?: boolean - [k: string]: unknown } export function isModEventComment(v: unknown): v is ModEventComment & { @@ -262,11 +262,11 @@ export function validateModEventComment(v: unknown) { /** Report a subject */ export interface ModEventReport { + $type?: 'tools.ozone.moderation.defs#modEventReport' comment?: string /** 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. */ isReporterMuted?: boolean reportType: ComAtprotoModerationDefs.ReasonType - [k: string]: unknown } export function isModEventReport(v: unknown): v is ModEventReport & { @@ -284,10 +284,10 @@ export function validateModEventReport(v: unknown) { /** Apply/Negate labels on a subject */ export interface ModEventLabel { + $type?: 'tools.ozone.moderation.defs#modEventLabel' comment?: string createLabelVals: string[] negateLabelVals: string[] - [k: string]: unknown } export function isModEventLabel(v: unknown): v is ModEventLabel & { @@ -304,8 +304,8 @@ export function validateModEventLabel(v: unknown) { } export interface ModEventAcknowledge { + $type?: 'tools.ozone.moderation.defs#modEventAcknowledge' comment?: string - [k: string]: unknown } export function isModEventAcknowledge(v: unknown): v is ModEventAcknowledge & { @@ -322,8 +322,8 @@ export function validateModEventAcknowledge(v: unknown) { } export interface ModEventEscalate { + $type?: 'tools.ozone.moderation.defs#modEventEscalate' comment?: string - [k: string]: unknown } export function isModEventEscalate(v: unknown): v is ModEventEscalate & { @@ -341,10 +341,10 @@ export function validateModEventEscalate(v: unknown) { /** Mute incoming reports on a subject */ export interface ModEventMute { + $type?: 'tools.ozone.moderation.defs#modEventMute' comment?: string /** Indicates how long the subject should remain muted. */ durationInHours: number - [k: string]: unknown } export function isModEventMute(v: unknown): v is ModEventMute & { @@ -362,9 +362,9 @@ export function validateModEventMute(v: unknown) { /** Unmute action on a subject */ export interface ModEventUnmute { + $type?: 'tools.ozone.moderation.defs#modEventUnmute' /** Describe reasoning behind the reversal. */ comment?: string - [k: string]: unknown } export function isModEventUnmute(v: unknown): v is ModEventUnmute & { @@ -382,10 +382,10 @@ export function validateModEventUnmute(v: unknown) { /** Mute incoming reports from an account */ export interface ModEventMuteReporter { + $type?: 'tools.ozone.moderation.defs#modEventMuteReporter' comment?: string /** Indicates how long the account should remain muted. Falsy value here means a permanent mute. */ durationInHours?: number - [k: string]: unknown } export function isModEventMuteReporter( @@ -405,9 +405,9 @@ export function validateModEventMuteReporter(v: unknown) { /** Unmute incoming reports from an account */ export interface ModEventUnmuteReporter { + $type?: 'tools.ozone.moderation.defs#modEventUnmuteReporter' /** Describe reasoning behind the reversal. */ comment?: string - [k: string]: unknown } export function isModEventUnmuteReporter( @@ -427,13 +427,13 @@ export function validateModEventUnmuteReporter(v: unknown) { /** Keep a log of outgoing email to a user */ export interface ModEventEmail { + $type?: 'tools.ozone.moderation.defs#modEventEmail' /** The subject line of the email sent to the user. */ subjectLine: string /** The content of the email sent to the user. */ content?: string /** Additional comment about the outgoing comm. */ comment?: string - [k: string]: unknown } export function isModEventEmail(v: unknown): v is ModEventEmail & { @@ -451,8 +451,8 @@ export function validateModEventEmail(v: unknown) { /** Divert a record's blobs to a 3rd party service for further scanning/tagging */ export interface ModEventDivert { + $type?: 'tools.ozone.moderation.defs#modEventDivert' comment?: string - [k: string]: unknown } export function isModEventDivert(v: unknown): v is ModEventDivert & { @@ -470,13 +470,13 @@ export function validateModEventDivert(v: unknown) { /** Add/Remove a tag on a subject */ export interface ModEventTag { + $type?: 'tools.ozone.moderation.defs#modEventTag' /** Tags to be added to the subject. If already exists, won't be duplicated. */ add: string[] /** Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. */ remove: string[] /** Additional comment about added/removed tags. */ comment?: string - [k: string]: unknown } export function isModEventTag(v: unknown): v is ModEventTag & { @@ -494,6 +494,7 @@ export function validateModEventTag(v: unknown) { /** Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. */ export interface AccountEvent { + $type?: 'tools.ozone.moderation.defs#accountEvent' comment?: string /** Indicates that the account has a repository which can be fetched from the host that emitted this event. */ active: boolean @@ -506,7 +507,6 @@ export interface AccountEvent { | 'tombstoned' | (string & {}) timestamp: string - [k: string]: unknown } export function isAccountEvent(v: unknown): v is AccountEvent & { @@ -524,12 +524,12 @@ export function validateAccountEvent(v: unknown) { /** Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. */ export interface IdentityEvent { + $type?: 'tools.ozone.moderation.defs#identityEvent' comment?: string handle?: string pdsHost?: string tombstone?: boolean timestamp: string - [k: string]: unknown } export function isIdentityEvent(v: unknown): v is IdentityEvent & { @@ -547,11 +547,11 @@ export function validateIdentityEvent(v: unknown) { /** Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. */ export interface RecordEvent { + $type?: 'tools.ozone.moderation.defs#recordEvent' comment?: string op: 'create' | 'update' | 'delete' | (string & {}) cid?: string timestamp: string - [k: string]: unknown } export function isRecordEvent(v: unknown): v is RecordEvent & { @@ -568,10 +568,11 @@ export function validateRecordEvent(v: unknown) { } export interface RepoView { + $type?: 'tools.ozone.moderation.defs#repoView' did: string handle: string email?: string - relatedRecords: {}[] + relatedRecords: { [_ in string]: unknown }[] indexedAt: string moderation: Moderation invitedBy?: ComAtprotoServerDefs.InviteCode @@ -579,7 +580,6 @@ export interface RepoView { inviteNote?: string deactivatedAt?: string threatSignatures?: ComAtprotoAdminDefs.ThreatSignature[] - [k: string]: unknown } export function isRepoView( @@ -593,10 +593,11 @@ export function validateRepoView(v: unknown) { } export interface RepoViewDetail { + $type?: 'tools.ozone.moderation.defs#repoViewDetail' did: string handle: string email?: string - relatedRecords: {}[] + relatedRecords: { [_ in string]: unknown }[] indexedAt: string moderation: ModerationDetail labels?: ComAtprotoLabelDefs.Label[] @@ -607,7 +608,6 @@ export interface RepoViewDetail { emailConfirmedAt?: string deactivatedAt?: string threatSignatures?: ComAtprotoAdminDefs.ThreatSignature[] - [k: string]: unknown } export function isRepoViewDetail(v: unknown): v is RepoViewDetail & { @@ -624,8 +624,8 @@ export function validateRepoViewDetail(v: unknown) { } export interface RepoViewNotFound { + $type?: 'tools.ozone.moderation.defs#repoViewNotFound' did: string - [k: string]: unknown } export function isRepoViewNotFound(v: unknown): v is RepoViewNotFound & { @@ -642,14 +642,14 @@ export function validateRepoViewNotFound(v: unknown) { } export interface RecordView { + $type?: 'tools.ozone.moderation.defs#recordView' uri: string cid: string - value: {} + value: { [_ in string]: unknown } blobCids: string[] indexedAt: string moderation: Moderation repo: RepoView - [k: string]: unknown } export function isRecordView(v: unknown): v is RecordView & { @@ -666,15 +666,15 @@ export function validateRecordView(v: unknown) { } export interface RecordViewDetail { + $type?: 'tools.ozone.moderation.defs#recordViewDetail' uri: string cid: string - value: {} + value: { [_ in string]: unknown } blobs: BlobView[] labels?: ComAtprotoLabelDefs.Label[] indexedAt: string moderation: ModerationDetail repo: RepoView - [k: string]: unknown } export function isRecordViewDetail(v: unknown): v is RecordViewDetail & { @@ -691,8 +691,8 @@ export function validateRecordViewDetail(v: unknown) { } export interface RecordViewNotFound { + $type?: 'tools.ozone.moderation.defs#recordViewNotFound' uri: string - [k: string]: unknown } export function isRecordViewNotFound(v: unknown): v is RecordViewNotFound & { @@ -709,8 +709,8 @@ export function validateRecordViewNotFound(v: unknown) { } export interface Moderation { + $type?: 'tools.ozone.moderation.defs#moderation' subjectStatus?: SubjectStatusView - [k: string]: unknown } export function isModeration(v: unknown): v is Moderation & { @@ -727,8 +727,8 @@ export function validateModeration(v: unknown) { } export interface ModerationDetail { + $type?: 'tools.ozone.moderation.defs#moderationDetail' subjectStatus?: SubjectStatusView - [k: string]: unknown } export function isModerationDetail(v: unknown): v is ModerationDetail & { @@ -745,6 +745,7 @@ export function validateModerationDetail(v: unknown) { } export interface BlobView { + $type?: 'tools.ozone.moderation.defs#blobView' cid: string mimeType: string size: number @@ -754,7 +755,6 @@ export interface BlobView { | VideoDetails | { $type: string; [k: string]: unknown } moderation?: Moderation - [k: string]: unknown } export function isBlobView( @@ -768,9 +768,9 @@ export function validateBlobView(v: unknown) { } export interface ImageDetails { + $type?: 'tools.ozone.moderation.defs#imageDetails' width: number height: number - [k: string]: unknown } export function isImageDetails(v: unknown): v is ImageDetails & { @@ -787,10 +787,10 @@ export function validateImageDetails(v: unknown) { } export interface VideoDetails { + $type?: 'tools.ozone.moderation.defs#videoDetails' width: number height: number length: number - [k: string]: unknown } export function isVideoDetails(v: unknown): v is VideoDetails & { @@ -807,6 +807,7 @@ export function validateVideoDetails(v: unknown) { } export interface AccountHosting { + $type?: 'tools.ozone.moderation.defs#accountHosting' status: | 'takendown' | 'suspended' @@ -819,7 +820,6 @@ export interface AccountHosting { deletedAt?: string deactivatedAt?: string reactivatedAt?: string - [k: string]: unknown } export function isAccountHosting(v: unknown): v is AccountHosting & { @@ -836,11 +836,11 @@ export function validateAccountHosting(v: unknown) { } export interface RecordHosting { + $type?: 'tools.ozone.moderation.defs#recordHosting' status: 'deleted' | 'unknown' | (string & {}) updatedAt?: string createdAt?: string deletedAt?: string - [k: string]: unknown } export function isRecordHosting(v: unknown): v is RecordHosting & { diff --git a/packages/ozone/src/lexicon/types/tools/ozone/moderation/emitEvent.ts b/packages/ozone/src/lexicon/types/tools/ozone/moderation/emitEvent.ts index 5d41651d75c..11d075ff86a 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/moderation/emitEvent.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs' @@ -41,7 +41,6 @@ export interface InputSchema { | { $type: string; [k: string]: unknown } subjectBlobCids?: string[] createdBy: string - [k: string]: unknown } export type OutputSchema = ToolsOzoneModerationDefs.ModEventView diff --git a/packages/ozone/src/lexicon/types/tools/ozone/moderation/getEvent.ts b/packages/ozone/src/lexicon/types/tools/ozone/moderation/getEvent.ts index 0392a5d1ed8..5fd977684f5 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/moderation/getEvent.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/moderation/getEvent.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' diff --git a/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRecord.ts b/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRecord.ts index 8399a8cc5cf..e1741f54b65 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRecord.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' diff --git a/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRecords.ts b/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRecords.ts index a15d946ae16..e73d8992ee6 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRecords.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRecords.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' @@ -23,7 +23,6 @@ export interface OutputSchema { | ToolsOzoneModerationDefs.RecordViewNotFound | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRepo.ts b/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRepo.ts index e5d93c71324..ceeaebdfbab 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRepo.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRepo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' diff --git a/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRepos.ts b/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRepos.ts index 808b8ae4ae4..76f4fd692af 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRepos.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/moderation/getRepos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' @@ -23,7 +23,6 @@ export interface OutputSchema { | ToolsOzoneModerationDefs.RepoViewNotFound | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/tools/ozone/moderation/queryEvents.ts b/packages/ozone/src/lexicon/types/tools/ozone/moderation/queryEvents.ts index c388065c5c7..0b7a66ef9c3 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/moderation/queryEvents.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/moderation/queryEvents.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' @@ -50,7 +50,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string events: ToolsOzoneModerationDefs.ModEventView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts b/packages/ozone/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts index 39ef2e8fb91..ce9b5c48f3c 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' @@ -66,7 +66,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string subjectStatuses: ToolsOzoneModerationDefs.SubjectStatusView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/tools/ozone/moderation/searchRepos.ts b/packages/ozone/src/lexicon/types/tools/ozone/moderation/searchRepos.ts index e05919680f6..2cc3ea4e1b0 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/moderation/searchRepos.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/moderation/searchRepos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' @@ -24,7 +24,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string repos: ToolsOzoneModerationDefs.RepoView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/tools/ozone/server/getConfig.ts b/packages/ozone/src/lexicon/types/tools/ozone/server/getConfig.ts index 8a1b5267386..d21f9c1c8f4 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/server/getConfig.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/server/getConfig.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.server.getConfig' @@ -20,7 +20,6 @@ export interface OutputSchema { blobDivert?: ServiceConfig chat?: ServiceConfig viewer?: ViewerConfig - [k: string]: unknown } export type HandlerInput = undefined @@ -49,8 +48,8 @@ export type Handler = ( ) => Promise | HandlerOutput export interface ServiceConfig { + $type?: 'tools.ozone.server.getConfig#serviceConfig' url?: string - [k: string]: unknown } export function isServiceConfig(v: unknown): v is ServiceConfig & { @@ -67,12 +66,12 @@ export function validateServiceConfig(v: unknown) { } export interface ViewerConfig { + $type?: 'tools.ozone.server.getConfig#viewerConfig' role?: | 'tools.ozone.team.defs#roleAdmin' | 'tools.ozone.team.defs#roleModerator' | 'tools.ozone.team.defs#roleTriage' | (string & {}) - [k: string]: unknown } export function isViewerConfig(v: unknown): v is ViewerConfig & { diff --git a/packages/ozone/src/lexicon/types/tools/ozone/set/addValues.ts b/packages/ozone/src/lexicon/types/tools/ozone/set/addValues.ts index 5fc024f43a5..4902bfb97be 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/set/addValues.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/set/addValues.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.set.addValues' @@ -17,7 +17,6 @@ export interface InputSchema { name: string /** Array of string values to add to the set */ values: string[] - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/tools/ozone/set/defs.ts b/packages/ozone/src/lexicon/types/tools/ozone/set/defs.ts index 42d8b8408f4..3308c575feb 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/set/defs.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/set/defs.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'tools.ozone.set.defs' export interface Set { + $type?: 'tools.ozone.set.defs#set' name: string description?: string - [k: string]: unknown } export function isSet( @@ -25,12 +25,12 @@ export function validateSet(v: unknown) { } export interface SetView { + $type?: 'tools.ozone.set.defs#setView' name: string description?: string setSize: number createdAt: string updatedAt: string - [k: string]: unknown } export function isSetView( diff --git a/packages/ozone/src/lexicon/types/tools/ozone/set/deleteSet.ts b/packages/ozone/src/lexicon/types/tools/ozone/set/deleteSet.ts index 393e9d47eb4..f13dc04e9f7 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/set/deleteSet.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/set/deleteSet.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.set.deleteSet' @@ -15,12 +15,9 @@ export interface QueryParams {} export interface InputSchema { /** Name of the set to delete */ name: string - [k: string]: unknown } -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export interface HandlerInput { encoding: 'application/json' diff --git a/packages/ozone/src/lexicon/types/tools/ozone/set/deleteValues.ts b/packages/ozone/src/lexicon/types/tools/ozone/set/deleteValues.ts index 12edfa9462a..55176666a45 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/set/deleteValues.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/set/deleteValues.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.set.deleteValues' @@ -17,7 +17,6 @@ export interface InputSchema { name: string /** Array of string values to delete from the set */ values: string[] - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/tools/ozone/set/getValues.ts b/packages/ozone/src/lexicon/types/tools/ozone/set/getValues.ts index 3d932525902..389750cfbc6 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/set/getValues.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/set/getValues.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneSetDefs from './defs' @@ -23,7 +23,6 @@ export interface OutputSchema { set: ToolsOzoneSetDefs.SetView values: string[] cursor?: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/tools/ozone/set/querySets.ts b/packages/ozone/src/lexicon/types/tools/ozone/set/querySets.ts index 5f45a0c8d18..79a6575afab 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/set/querySets.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/set/querySets.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneSetDefs from './defs' @@ -25,7 +25,6 @@ export type InputSchema = undefined export interface OutputSchema { sets: ToolsOzoneSetDefs.SetView[] cursor?: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/tools/ozone/set/upsertSet.ts b/packages/ozone/src/lexicon/types/tools/ozone/set/upsertSet.ts index c8993daf2cd..a562c68a43f 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/set/upsertSet.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/set/upsertSet.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneSetDefs from './defs' diff --git a/packages/ozone/src/lexicon/types/tools/ozone/setting/defs.ts b/packages/ozone/src/lexicon/types/tools/ozone/setting/defs.ts index f23a1d57b55..fb492a8c84d 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/setting/defs.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/setting/defs.ts @@ -4,14 +4,15 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'tools.ozone.setting.defs' export interface Option { + $type?: 'tools.ozone.setting.defs#option' key: string did: string - value: {} + value: { [_ in string]: unknown } description?: string createdAt?: string updatedAt?: string @@ -23,7 +24,6 @@ export interface Option { scope: 'instance' | 'personal' | (string & {}) createdBy: string lastUpdatedBy: string - [k: string]: unknown } export function isOption( diff --git a/packages/ozone/src/lexicon/types/tools/ozone/setting/listOptions.ts b/packages/ozone/src/lexicon/types/tools/ozone/setting/listOptions.ts index cc25208aff8..eee46b6a31d 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/setting/listOptions.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/setting/listOptions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneSettingDefs from './defs' @@ -26,7 +26,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string options: ToolsOzoneSettingDefs.Option[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/tools/ozone/setting/removeOptions.ts b/packages/ozone/src/lexicon/types/tools/ozone/setting/removeOptions.ts index 1bd586ae568..3ad95ef86e6 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/setting/removeOptions.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/setting/removeOptions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.setting.removeOptions' @@ -15,12 +15,9 @@ export interface QueryParams {} export interface InputSchema { keys: string[] scope: 'instance' | 'personal' | (string & {}) - [k: string]: unknown } -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export interface HandlerInput { encoding: 'application/json' diff --git a/packages/ozone/src/lexicon/types/tools/ozone/setting/upsertOption.ts b/packages/ozone/src/lexicon/types/tools/ozone/setting/upsertOption.ts index 5bff052c953..aaf5e216ba4 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/setting/upsertOption.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/setting/upsertOption.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneSettingDefs from './defs' @@ -16,19 +16,17 @@ export interface QueryParams {} export interface InputSchema { key: string scope: 'instance' | 'personal' | (string & {}) - value: {} + value: { [_ in string]: unknown } description?: string managerRole?: | 'tools.ozone.team.defs#roleModerator' | 'tools.ozone.team.defs#roleTriage' | 'tools.ozone.team.defs#roleAdmin' | (string & {}) - [k: string]: unknown } export interface OutputSchema { option: ToolsOzoneSettingDefs.Option - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/tools/ozone/signature/defs.ts b/packages/ozone/src/lexicon/types/tools/ozone/signature/defs.ts index 9dfcc4d533f..19f6f9f0d38 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/signature/defs.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/signature/defs.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'tools.ozone.signature.defs' export interface SigDetail { + $type?: 'tools.ozone.signature.defs#sigDetail' property: string value: string - [k: string]: unknown } export function isSigDetail(v: unknown): v is SigDetail & { diff --git a/packages/ozone/src/lexicon/types/tools/ozone/signature/findCorrelation.ts b/packages/ozone/src/lexicon/types/tools/ozone/signature/findCorrelation.ts index b72d9a6ec93..7a2af9194fc 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/signature/findCorrelation.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/signature/findCorrelation.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneSignatureDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { details: ToolsOzoneSignatureDefs.SigDetail[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/tools/ozone/signature/findRelatedAccounts.ts b/packages/ozone/src/lexicon/types/tools/ozone/signature/findRelatedAccounts.ts index 3d323702971..fab7954d914 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/signature/findRelatedAccounts.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/signature/findRelatedAccounts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs' import * as ToolsOzoneSignatureDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string accounts: RelatedAccount[] - [k: string]: unknown } export type HandlerInput = undefined @@ -52,9 +51,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface RelatedAccount { + $type?: 'tools.ozone.signature.findRelatedAccounts#relatedAccount' account: ComAtprotoAdminDefs.AccountView similarities?: ToolsOzoneSignatureDefs.SigDetail[] - [k: string]: unknown } export function isRelatedAccount(v: unknown): v is RelatedAccount & { diff --git a/packages/ozone/src/lexicon/types/tools/ozone/signature/searchAccounts.ts b/packages/ozone/src/lexicon/types/tools/ozone/signature/searchAccounts.ts index 3d91d44c7bd..b85d7a624b8 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/signature/searchAccounts.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/signature/searchAccounts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string accounts: ComAtprotoAdminDefs.AccountView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/tools/ozone/team/addMember.ts b/packages/ozone/src/lexicon/types/tools/ozone/team/addMember.ts index bfa47301f80..5676f917795 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/team/addMember.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/team/addMember.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneTeamDefs from './defs' @@ -20,7 +20,6 @@ export interface InputSchema { | 'tools.ozone.team.defs#roleModerator' | 'tools.ozone.team.defs#roleTriage' | (string & {}) - [k: string]: unknown } export type OutputSchema = ToolsOzoneTeamDefs.Member diff --git a/packages/ozone/src/lexicon/types/tools/ozone/team/defs.ts b/packages/ozone/src/lexicon/types/tools/ozone/team/defs.ts index 72ded235a9e..f3b209f5b60 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/team/defs.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/team/defs.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyActorDefs from '../../../app/bsky/actor/defs' export const id = 'tools.ozone.team.defs' export interface Member { + $type?: 'tools.ozone.team.defs#member' did: string disabled?: boolean profile?: AppBskyActorDefs.ProfileViewDetailed @@ -21,7 +22,6 @@ export interface Member { | 'lex:tools.ozone.team.defs#roleModerator' | 'lex:tools.ozone.team.defs#roleTriage' | (string & {}) - [k: string]: unknown } export function isMember( diff --git a/packages/ozone/src/lexicon/types/tools/ozone/team/deleteMember.ts b/packages/ozone/src/lexicon/types/tools/ozone/team/deleteMember.ts index a53d277594e..325a567ca70 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/team/deleteMember.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/team/deleteMember.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.team.deleteMember' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { did: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/ozone/src/lexicon/types/tools/ozone/team/listMembers.ts b/packages/ozone/src/lexicon/types/tools/ozone/team/listMembers.ts index 45d63f49928..2ceeff8a285 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/team/listMembers.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/team/listMembers.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneTeamDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string members: ToolsOzoneTeamDefs.Member[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/ozone/src/lexicon/types/tools/ozone/team/updateMember.ts b/packages/ozone/src/lexicon/types/tools/ozone/team/updateMember.ts index 35b0d666ae9..776a4c0fde2 100644 --- a/packages/ozone/src/lexicon/types/tools/ozone/team/updateMember.ts +++ b/packages/ozone/src/lexicon/types/tools/ozone/team/updateMember.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneTeamDefs from './defs' @@ -21,7 +21,6 @@ export interface InputSchema { | 'tools.ozone.team.defs#roleModerator' | 'tools.ozone.team.defs#roleTriage' | (string & {}) - [k: string]: unknown } export type OutputSchema = ToolsOzoneTeamDefs.Member diff --git a/packages/ozone/src/lexicon/util.ts b/packages/ozone/src/lexicon/util.ts index c7e9539d1f1..238eabe8742 100644 --- a/packages/ozone/src/lexicon/util.ts +++ b/packages/ozone/src/lexicon/util.ts @@ -1,6 +1,10 @@ /** * GENERATED CODE - DO NOT MODIFY */ +export type OmitKey = { + [K2 in keyof T as K2 extends K ? never : K2]: T[K2] +} + export type $Type = Hash extends 'main' ? Id | `${Id}#${Hash}` : `${Id}#${Hash}` diff --git a/packages/pds/src/lexicon/types/app/bsky/actor/defs.ts b/packages/pds/src/lexicon/types/app/bsky/actor/defs.ts index 328965f4b18..2639dd12a1b 100644 --- a/packages/pds/src/lexicon/types/app/bsky/actor/defs.ts +++ b/packages/pds/src/lexicon/types/app/bsky/actor/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' import * as AppBskyGraphDefs from '../graph/defs' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' @@ -12,6 +12,7 @@ import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.actor.defs' export interface ProfileViewBasic { + $type?: 'app.bsky.actor.defs#profileViewBasic' did: string handle: string displayName?: string @@ -20,7 +21,6 @@ export interface ProfileViewBasic { viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] createdAt?: string - [k: string]: unknown } export function isProfileViewBasic(v: unknown): v is ProfileViewBasic & { @@ -37,6 +37,7 @@ export function validateProfileViewBasic(v: unknown) { } export interface ProfileView { + $type?: 'app.bsky.actor.defs#profileView' did: string handle: string displayName?: string @@ -47,7 +48,6 @@ export interface ProfileView { createdAt?: string viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isProfileView( @@ -64,6 +64,7 @@ export function validateProfileView(v: unknown) { } export interface ProfileViewDetailed { + $type?: 'app.bsky.actor.defs#profileViewDetailed' did: string handle: string displayName?: string @@ -80,7 +81,6 @@ export interface ProfileViewDetailed { viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] pinnedPost?: ComAtprotoRepoStrongRef.Main - [k: string]: unknown } export function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed & { @@ -97,12 +97,12 @@ export function validateProfileViewDetailed(v: unknown) { } export interface ProfileAssociated { + $type?: 'app.bsky.actor.defs#profileAssociated' lists?: number feedgens?: number starterPacks?: number labeler?: boolean chat?: ProfileAssociatedChat - [k: string]: unknown } export function isProfileAssociated(v: unknown): v is ProfileAssociated & { @@ -119,8 +119,8 @@ export function validateProfileAssociated(v: unknown) { } export interface ProfileAssociatedChat { + $type?: 'app.bsky.actor.defs#profileAssociatedChat' allowIncoming: 'all' | 'none' | 'following' | (string & {}) - [k: string]: unknown } export function isProfileAssociatedChat( @@ -140,6 +140,7 @@ export function validateProfileAssociatedChat(v: unknown) { /** 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 @@ -148,7 +149,6 @@ export interface ViewerState { following?: string followedBy?: string knownFollowers?: KnownFollowers - [k: string]: unknown } export function isViewerState( @@ -166,9 +166,9 @@ export function validateViewerState(v: unknown) { /** The subject's followers whom you also follow */ export interface KnownFollowers { + $type?: 'app.bsky.actor.defs#knownFollowers' count: number followers: ProfileViewBasic[] - [k: string]: unknown } export function isKnownFollowers(v: unknown): v is KnownFollowers & { @@ -201,8 +201,8 @@ export type Preferences = ( )[] export interface AdultContentPref { + $type?: 'app.bsky.actor.defs#adultContentPref' enabled: boolean - [k: string]: unknown } export function isAdultContentPref(v: unknown): v is AdultContentPref & { @@ -219,11 +219,11 @@ export function validateAdultContentPref(v: unknown) { } 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 & {}) - [k: string]: unknown } export function isContentLabelPref(v: unknown): v is ContentLabelPref & { @@ -240,11 +240,11 @@ export function validateContentLabelPref(v: unknown) { } export interface SavedFeed { + $type?: 'app.bsky.actor.defs#savedFeed' id: string type: 'feed' | 'list' | 'timeline' | (string & {}) value: string pinned: boolean - [k: string]: unknown } export function isSavedFeed( @@ -258,8 +258,8 @@ export function validateSavedFeed(v: unknown) { } export interface SavedFeedsPrefV2 { + $type?: 'app.bsky.actor.defs#savedFeedsPrefV2' items: SavedFeed[] - [k: string]: unknown } export function isSavedFeedsPrefV2(v: unknown): v is SavedFeedsPrefV2 & { @@ -276,10 +276,10 @@ export function validateSavedFeedsPrefV2(v: unknown) { } export interface SavedFeedsPref { + $type?: 'app.bsky.actor.defs#savedFeedsPref' pinned: string[] saved: string[] timelineIndex?: number - [k: string]: unknown } export function isSavedFeedsPref(v: unknown): v is SavedFeedsPref & { @@ -296,9 +296,9 @@ export function validateSavedFeedsPref(v: unknown) { } export interface PersonalDetailsPref { + $type?: 'app.bsky.actor.defs#personalDetailsPref' /** The birth date of account owner. */ birthDate?: string - [k: string]: unknown } export function isPersonalDetailsPref(v: unknown): v is PersonalDetailsPref & { @@ -315,6 +315,7 @@ export function validatePersonalDetailsPref(v: unknown) { } 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. */ @@ -327,7 +328,6 @@ export interface FeedViewPref { hideReposts?: boolean /** Hide quote posts in the feed. */ hideQuotePosts?: boolean - [k: string]: unknown } export function isFeedViewPref( @@ -344,11 +344,11 @@ export function validateFeedViewPref(v: unknown) { } export interface ThreadViewPref { + $type?: 'app.bsky.actor.defs#threadViewPref' /** Sorting mode for threads. */ sort?: 'oldest' | 'newest' | 'most-likes' | 'random' | (string & {}) /** Show followed users at the top of all replies. */ prioritizeFollowedUsers?: boolean - [k: string]: unknown } export function isThreadViewPref(v: unknown): v is ThreadViewPref & { @@ -365,9 +365,9 @@ export function validateThreadViewPref(v: unknown) { } 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[] - [k: string]: unknown } export function isInterestsPref(v: unknown): v is InterestsPref & { @@ -387,6 +387,7 @@ export type MutedWordTarget = 'content' | 'tag' | (string & {}) /** 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 @@ -396,7 +397,6 @@ export interface MutedWord { actorTarget: 'all' | 'exclude-following' | (string & {}) /** The date and time at which the muted word will expire and no longer be applied. */ expiresAt?: string - [k: string]: unknown } export function isMutedWord( @@ -410,9 +410,9 @@ export function validateMutedWord(v: unknown) { } export interface MutedWordsPref { + $type?: 'app.bsky.actor.defs#mutedWordsPref' /** A list of words the account owner has muted. */ items: MutedWord[] - [k: string]: unknown } export function isMutedWordsPref(v: unknown): v is MutedWordsPref & { @@ -429,9 +429,9 @@ export function validateMutedWordsPref(v: unknown) { } export interface HiddenPostsPref { + $type?: 'app.bsky.actor.defs#hiddenPostsPref' /** A list of URIs of posts the account owner has hidden. */ items: string[] - [k: string]: unknown } export function isHiddenPostsPref(v: unknown): v is HiddenPostsPref & { @@ -448,8 +448,8 @@ export function validateHiddenPostsPref(v: unknown) { } export interface LabelersPref { + $type?: 'app.bsky.actor.defs#labelersPref' labelers: LabelerPrefItem[] - [k: string]: unknown } export function isLabelersPref( @@ -466,8 +466,8 @@ export function validateLabelersPref(v: unknown) { } export interface LabelerPrefItem { + $type?: 'app.bsky.actor.defs#labelerPrefItem' did: string - [k: string]: unknown } export function isLabelerPrefItem(v: unknown): v is LabelerPrefItem & { @@ -485,12 +485,12 @@ export function validateLabelerPrefItem(v: unknown) { /** 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[] - [k: string]: unknown } export function isBskyAppStatePref(v: unknown): v is BskyAppStatePref & { @@ -508,8 +508,8 @@ export function validateBskyAppStatePref(v: unknown) { /** 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 - [k: string]: unknown } export function isBskyAppProgressGuide( @@ -529,13 +529,13 @@ export function validateBskyAppProgressGuide(v: unknown) { /** 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 - [k: string]: unknown } export function isNux( diff --git a/packages/pds/src/lexicon/types/app/bsky/actor/getPreferences.ts b/packages/pds/src/lexicon/types/app/bsky/actor/getPreferences.ts index 05250886bac..0eaa39da433 100644 --- a/packages/pds/src/lexicon/types/app/bsky/actor/getPreferences.ts +++ b/packages/pds/src/lexicon/types/app/bsky/actor/getPreferences.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -17,7 +17,6 @@ export type InputSchema = undefined export interface OutputSchema { preferences: AppBskyActorDefs.Preferences - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/actor/getProfile.ts b/packages/pds/src/lexicon/types/app/bsky/actor/getProfile.ts index 03f7ba1e696..7f88e389db6 100644 --- a/packages/pds/src/lexicon/types/app/bsky/actor/getProfile.ts +++ b/packages/pds/src/lexicon/types/app/bsky/actor/getProfile.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' diff --git a/packages/pds/src/lexicon/types/app/bsky/actor/getProfiles.ts b/packages/pds/src/lexicon/types/app/bsky/actor/getProfiles.ts index 812ee707643..75f82cd708a 100644 --- a/packages/pds/src/lexicon/types/app/bsky/actor/getProfiles.ts +++ b/packages/pds/src/lexicon/types/app/bsky/actor/getProfiles.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { profiles: AppBskyActorDefs.ProfileViewDetailed[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts b/packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts index 6881ca4a977..03fba3565f5 100644 --- a/packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts +++ b/packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string actors: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/actor/profile.ts b/packages/pds/src/lexicon/types/app/bsky/actor/profile.ts index 59193587c97..d884084db62 100644 --- a/packages/pds/src/lexicon/types/app/bsky/actor/profile.ts +++ b/packages/pds/src/lexicon/types/app/bsky/actor/profile.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.actor.profile' export interface Record { + $type?: 'app.bsky.actor.profile' | 'app.bsky.actor.profile#main' displayName?: string /** Free-form profile description text. */ description?: string diff --git a/packages/pds/src/lexicon/types/app/bsky/actor/putPreferences.ts b/packages/pds/src/lexicon/types/app/bsky/actor/putPreferences.ts index 98ec8ef5bbe..3910dc2397e 100644 --- a/packages/pds/src/lexicon/types/app/bsky/actor/putPreferences.ts +++ b/packages/pds/src/lexicon/types/app/bsky/actor/putPreferences.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { preferences: AppBskyActorDefs.Preferences - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/app/bsky/actor/searchActors.ts b/packages/pds/src/lexicon/types/app/bsky/actor/searchActors.ts index 62a7b64110c..fac3a323ef6 100644 --- a/packages/pds/src/lexicon/types/app/bsky/actor/searchActors.ts +++ b/packages/pds/src/lexicon/types/app/bsky/actor/searchActors.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -25,7 +25,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string actors: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts b/packages/pds/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts index 226a539deeb..f9aaad0f9a1 100644 --- a/packages/pds/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts +++ b/packages/pds/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { actors: AppBskyActorDefs.ProfileViewBasic[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/embed/defs.ts b/packages/pds/src/lexicon/types/app/bsky/embed/defs.ts index 6e5086aebe2..d6f76b22906 100644 --- a/packages/pds/src/lexicon/types/app/bsky/embed/defs.ts +++ b/packages/pds/src/lexicon/types/app/bsky/embed/defs.ts @@ -4,15 +4,15 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export 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 - [k: string]: unknown } export function isAspectRatio( diff --git a/packages/pds/src/lexicon/types/app/bsky/embed/external.ts b/packages/pds/src/lexicon/types/app/bsky/embed/external.ts index 95ac98d8ad8..930b9cb69ad 100644 --- a/packages/pds/src/lexicon/types/app/bsky/embed/external.ts +++ b/packages/pds/src/lexicon/types/app/bsky/embed/external.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export 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' | 'app.bsky.embed.external#main' external: External - [k: string]: unknown } export function isMain( @@ -25,11 +25,11 @@ export function validateMain(v: unknown) { } export interface External { + $type?: 'app.bsky.embed.external#external' uri: string title: string description: string thumb?: BlobRef - [k: string]: unknown } export function isExternal( @@ -43,8 +43,8 @@ export function validateExternal(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.external#view' external: ViewExternal - [k: string]: unknown } export function isView( @@ -58,11 +58,11 @@ export function validateView(v: unknown) { } export interface ViewExternal { + $type?: 'app.bsky.embed.external#viewExternal' uri: string title: string description: string thumb?: string - [k: string]: unknown } export function isViewExternal(v: unknown): v is ViewExternal & { diff --git a/packages/pds/src/lexicon/types/app/bsky/embed/images.ts b/packages/pds/src/lexicon/types/app/bsky/embed/images.ts index dc2a1cb1592..e2200856388 100644 --- a/packages/pds/src/lexicon/types/app/bsky/embed/images.ts +++ b/packages/pds/src/lexicon/types/app/bsky/embed/images.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyEmbedDefs from './defs' export const id = 'app.bsky.embed.images' export interface Main { + $type?: 'app.bsky.embed.images' | 'app.bsky.embed.images#main' images: Image[] - [k: string]: unknown } export function isMain( @@ -25,11 +25,11 @@ export function validateMain(v: unknown) { } export interface Image { + $type?: 'app.bsky.embed.images#image' image: BlobRef /** Alt text description of the image, for accessibility. */ alt: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isImage( @@ -43,8 +43,8 @@ export function validateImage(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.images#view' images: ViewImage[] - [k: string]: unknown } export function isView( @@ -58,6 +58,7 @@ export function validateView(v: unknown) { } 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. */ @@ -65,7 +66,6 @@ export interface ViewImage { /** Alt text description of the image, for accessibility. */ alt: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isViewImage( diff --git a/packages/pds/src/lexicon/types/app/bsky/embed/record.ts b/packages/pds/src/lexicon/types/app/bsky/embed/record.ts index 7740a9f83ab..24e795211a1 100644 --- a/packages/pds/src/lexicon/types/app/bsky/embed/record.ts +++ b/packages/pds/src/lexicon/types/app/bsky/embed/record.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' import * as AppBskyFeedDefs from '../feed/defs' import * as AppBskyGraphDefs from '../graph/defs' @@ -19,8 +19,8 @@ import * as AppBskyEmbedRecordWithMedia from './recordWithMedia' export const id = 'app.bsky.embed.record' export interface Main { + $type?: 'app.bsky.embed.record' | 'app.bsky.embed.record#main' record: ComAtprotoRepoStrongRef.Main - [k: string]: unknown } export function isMain( @@ -34,6 +34,7 @@ export function validateMain(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.record#view' record: | ViewRecord | ViewNotFound @@ -44,7 +45,6 @@ export interface View { | AppBskyLabelerDefs.LabelerView | AppBskyGraphDefs.StarterPackViewBasic | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isView( @@ -58,11 +58,12 @@ export function validateView(v: unknown) { } export interface ViewRecord { + $type?: 'app.bsky.embed.record#viewRecord' uri: string cid: string author: AppBskyActorDefs.ProfileViewBasic /** The record data itself. */ - value: {} + value: { [_ in string]: unknown } labels?: ComAtprotoLabelDefs.Label[] replyCount?: number repostCount?: number @@ -77,7 +78,6 @@ export interface ViewRecord { | { $type: string; [k: string]: unknown } )[] indexedAt: string - [k: string]: unknown } export function isViewRecord( @@ -94,9 +94,9 @@ export function validateViewRecord(v: unknown) { } export interface ViewNotFound { + $type?: 'app.bsky.embed.record#viewNotFound' uri: string notFound: true - [k: string]: unknown } export function isViewNotFound(v: unknown): v is ViewNotFound & { @@ -113,10 +113,10 @@ export function validateViewNotFound(v: unknown) { } export interface ViewBlocked { + $type?: 'app.bsky.embed.record#viewBlocked' uri: string blocked: true author: AppBskyFeedDefs.BlockedAuthor - [k: string]: unknown } export function isViewBlocked( @@ -133,9 +133,9 @@ export function validateViewBlocked(v: unknown) { } export interface ViewDetached { + $type?: 'app.bsky.embed.record#viewDetached' uri: string detached: true - [k: string]: unknown } export function isViewDetached(v: unknown): v is ViewDetached & { diff --git a/packages/pds/src/lexicon/types/app/bsky/embed/recordWithMedia.ts b/packages/pds/src/lexicon/types/app/bsky/embed/recordWithMedia.ts index 46b9a019a81..060a8d92eda 100644 --- a/packages/pds/src/lexicon/types/app/bsky/embed/recordWithMedia.ts +++ b/packages/pds/src/lexicon/types/app/bsky/embed/recordWithMedia.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyEmbedRecord from './record' import * as AppBskyEmbedImages from './images' import * as AppBskyEmbedVideo from './video' @@ -13,13 +13,15 @@ import * as AppBskyEmbedExternal from './external' export const id = 'app.bsky.embed.recordWithMedia' export interface Main { + $type?: + | 'app.bsky.embed.recordWithMedia' + | 'app.bsky.embed.recordWithMedia#main' record: AppBskyEmbedRecord.Main media: | AppBskyEmbedImages.Main | AppBskyEmbedVideo.Main | AppBskyEmbedExternal.Main | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isMain( @@ -33,13 +35,13 @@ export function validateMain(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.recordWithMedia#view' record: AppBskyEmbedRecord.View media: | AppBskyEmbedImages.View | AppBskyEmbedVideo.View | AppBskyEmbedExternal.View | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isView( diff --git a/packages/pds/src/lexicon/types/app/bsky/embed/video.ts b/packages/pds/src/lexicon/types/app/bsky/embed/video.ts index c688d3eeb3a..5ab82479197 100644 --- a/packages/pds/src/lexicon/types/app/bsky/embed/video.ts +++ b/packages/pds/src/lexicon/types/app/bsky/embed/video.ts @@ -4,18 +4,18 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyEmbedDefs from './defs' export const id = 'app.bsky.embed.video' export interface Main { + $type?: 'app.bsky.embed.video' | 'app.bsky.embed.video#main' video: BlobRef captions?: Caption[] /** Alt text description of the video, for accessibility. */ alt?: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isMain( @@ -29,9 +29,9 @@ export function validateMain(v: unknown) { } export interface Caption { + $type?: 'app.bsky.embed.video#caption' lang: string file: BlobRef - [k: string]: unknown } export function isCaption( @@ -45,12 +45,12 @@ export function validateCaption(v: unknown) { } export interface View { + $type?: 'app.bsky.embed.video#view' cid: string playlist: string thumbnail?: string alt?: string aspectRatio?: AppBskyEmbedDefs.AspectRatio - [k: string]: unknown } export function isView( diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/defs.ts b/packages/pds/src/lexicon/types/app/bsky/feed/defs.ts index 214907b3a54..3ccf73551e8 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/defs.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyActorDefs from '../actor/defs' import * as AppBskyEmbedImages from '../embed/images' import * as AppBskyEmbedVideo from '../embed/video' @@ -18,10 +18,11 @@ import * as AppBskyGraphDefs from '../graph/defs' export const id = 'app.bsky.feed.defs' export interface PostView { + $type?: 'app.bsky.feed.defs#postView' uri: string cid: string author: AppBskyActorDefs.ProfileViewBasic - record: {} + record: { [_ in string]: unknown } embed?: | AppBskyEmbedImages.View | AppBskyEmbedVideo.View @@ -37,7 +38,6 @@ export interface PostView { viewer?: ViewerState labels?: ComAtprotoLabelDefs.Label[] threadgate?: ThreadgateView - [k: string]: unknown } export function isPostView( @@ -52,13 +52,13 @@ export function validatePostView(v: unknown) { /** 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 threadMuted?: boolean replyDisabled?: boolean embeddingDisabled?: boolean pinned?: boolean - [k: string]: unknown } export function isViewerState( @@ -75,12 +75,12 @@ export function validateViewerState(v: unknown) { } export interface FeedViewPost { + $type?: 'app.bsky.feed.defs#feedViewPost' post: PostView reply?: ReplyRef reason?: ReasonRepost | ReasonPin | { $type: string; [k: string]: unknown } /** Context provided by feed generator that may be passed back alongside interactions. */ feedContext?: string - [k: string]: unknown } export function isFeedViewPost( @@ -97,6 +97,7 @@ export function validateFeedViewPost(v: unknown) { } export interface ReplyRef { + $type?: 'app.bsky.feed.defs#replyRef' root: | PostView | NotFoundPost @@ -108,7 +109,6 @@ export interface ReplyRef { | BlockedPost | { $type: string; [k: string]: unknown } grandparentAuthor?: AppBskyActorDefs.ProfileViewBasic - [k: string]: unknown } export function isReplyRef( @@ -122,9 +122,9 @@ export function validateReplyRef(v: unknown) { } export interface ReasonRepost { + $type?: 'app.bsky.feed.defs#reasonRepost' by: AppBskyActorDefs.ProfileViewBasic indexedAt: string - [k: string]: unknown } export function isReasonRepost( @@ -141,7 +141,7 @@ export function validateReasonRepost(v: unknown) { } export interface ReasonPin { - [k: string]: unknown + $type?: 'app.bsky.feed.defs#reasonPin' } export function isReasonPin( @@ -155,6 +155,7 @@ export function validateReasonPin(v: unknown) { } export interface ThreadViewPost { + $type?: 'app.bsky.feed.defs#threadViewPost' post: PostView parent?: | ThreadViewPost @@ -167,7 +168,6 @@ export interface ThreadViewPost { | BlockedPost | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export function isThreadViewPost(v: unknown): v is ThreadViewPost & { @@ -184,9 +184,9 @@ export function validateThreadViewPost(v: unknown) { } export interface NotFoundPost { + $type?: 'app.bsky.feed.defs#notFoundPost' uri: string notFound: true - [k: string]: unknown } export function isNotFoundPost( @@ -203,10 +203,10 @@ export function validateNotFoundPost(v: unknown) { } export interface BlockedPost { + $type?: 'app.bsky.feed.defs#blockedPost' uri: string blocked: true author: BlockedAuthor - [k: string]: unknown } export function isBlockedPost( @@ -223,9 +223,9 @@ export function validateBlockedPost(v: unknown) { } export interface BlockedAuthor { + $type?: 'app.bsky.feed.defs#blockedAuthor' did: string viewer?: AppBskyActorDefs.ViewerState - [k: string]: unknown } export function isBlockedAuthor(v: unknown): v is BlockedAuthor & { @@ -242,6 +242,7 @@ export function validateBlockedAuthor(v: unknown) { } export interface GeneratorView { + $type?: 'app.bsky.feed.defs#generatorView' uri: string cid: string did: string @@ -255,7 +256,6 @@ export interface GeneratorView { labels?: ComAtprotoLabelDefs.Label[] viewer?: GeneratorViewerState indexedAt: string - [k: string]: unknown } export function isGeneratorView(v: unknown): v is GeneratorView & { @@ -272,8 +272,8 @@ export function validateGeneratorView(v: unknown) { } export interface GeneratorViewerState { + $type?: 'app.bsky.feed.defs#generatorViewerState' like?: string - [k: string]: unknown } export function isGeneratorViewerState( @@ -292,6 +292,7 @@ export function validateGeneratorViewerState(v: unknown) { } export interface SkeletonFeedPost { + $type?: 'app.bsky.feed.defs#skeletonFeedPost' post: string reason?: | SkeletonReasonRepost @@ -299,7 +300,6 @@ export interface SkeletonFeedPost { | { $type: string; [k: string]: unknown } /** Context that will be passed through to client and may be passed to feed generator back alongside interactions. */ feedContext?: string - [k: string]: unknown } export function isSkeletonFeedPost(v: unknown): v is SkeletonFeedPost & { @@ -316,8 +316,8 @@ export function validateSkeletonFeedPost(v: unknown) { } export interface SkeletonReasonRepost { + $type?: 'app.bsky.feed.defs#skeletonReasonRepost' repost: string - [k: string]: unknown } export function isSkeletonReasonRepost( @@ -336,7 +336,7 @@ export function validateSkeletonReasonRepost(v: unknown) { } export interface SkeletonReasonPin { - [k: string]: unknown + $type?: 'app.bsky.feed.defs#skeletonReasonPin' } export function isSkeletonReasonPin(v: unknown): v is SkeletonReasonPin & { @@ -353,11 +353,11 @@ export function validateSkeletonReasonPin(v: unknown) { } export interface ThreadgateView { + $type?: 'app.bsky.feed.defs#threadgateView' uri?: string cid?: string - record?: {} + record?: { [_ in string]: unknown } lists?: AppBskyGraphDefs.ListViewBasic[] - [k: string]: unknown } export function isThreadgateView(v: unknown): v is ThreadgateView & { @@ -374,6 +374,7 @@ export function validateThreadgateView(v: unknown) { } export interface Interaction { + $type?: 'app.bsky.feed.defs#interaction' item?: string event?: | 'app.bsky.feed.defs#requestLess' @@ -391,7 +392,6 @@ export interface Interaction { | (string & {}) /** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. */ feedContext?: string - [k: string]: unknown } export function isInteraction( diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts b/packages/pds/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts index e76c4e836da..f8cef3e6bf9 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/describeFeedGenerator.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.feed.describeFeedGenerator' @@ -18,7 +18,6 @@ export interface OutputSchema { did: string feeds: Feed[] links?: Links - [k: string]: unknown } export type HandlerInput = undefined @@ -47,8 +46,8 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Feed { + $type?: 'app.bsky.feed.describeFeedGenerator#feed' uri: string - [k: string]: unknown } export function isFeed( @@ -62,9 +61,9 @@ export function validateFeed(v: unknown) { } export interface Links { + $type?: 'app.bsky.feed.describeFeedGenerator#links' privacyPolicy?: string termsOfService?: string - [k: string]: unknown } export function isLinks(v: unknown): v is Links & { diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/generator.ts b/packages/pds/src/lexicon/types/app/bsky/feed/generator.ts index af54d689d16..09af4502f85 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/generator.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/generator.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyRichtextFacet from '../richtext/facet' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.feed.generator' export interface Record { + $type?: 'app.bsky.feed.generator' | 'app.bsky.feed.generator#main' did: string displayName: string description?: string diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getActorFeeds.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getActorFeeds.ts index 1d6e18a7c0f..92ef78e3fa1 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getActorFeeds.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getActorFeeds.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getActorLikes.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getActorLikes.ts index b08c59ca52f..99aeb585dfe 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getActorLikes.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getActorLikes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts index b750af2a05c..9c66a9955e9 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getAuthorFeed.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -30,7 +30,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getFeed.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getFeed.ts index 255200d8e0e..f613fc74716 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getFeed.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getFeed.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts index 72a8e62049b..5c8167d093f 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getFeedGenerator.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -24,7 +24,6 @@ export interface OutputSchema { isOnline: boolean /** Indicates whether the feed generator service is compatible with the record declaration. */ isValid: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts index 0ae7bcb02fc..0f1ece530d3 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getFeedGenerators.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts index 66a4422d697..6d65f590f5d 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getFeedSkeleton.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.SkeletonFeedPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getLikes.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getLikes.ts index 2252a4a4684..180768c80c5 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getLikes.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getLikes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -27,7 +27,6 @@ export interface OutputSchema { cid?: string cursor?: string likes: Like[] - [k: string]: unknown } export type HandlerInput = undefined @@ -56,10 +55,10 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Like { + $type?: 'app.bsky.feed.getLikes#like' indexedAt: string createdAt: string actor: AppBskyActorDefs.ProfileView - [k: string]: unknown } export function isLike( diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getListFeed.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getListFeed.ts index 3863453bc4b..468a2d4302f 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getListFeed.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getListFeed.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getPostThread.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getPostThread.ts index af76f8129f3..12a0fdaefb9 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getPostThread.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getPostThread.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -29,7 +29,6 @@ export interface OutputSchema { | AppBskyFeedDefs.BlockedPost | { $type: string; [k: string]: unknown } threadgate?: AppBskyFeedDefs.ThreadgateView - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getPosts.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getPosts.ts index 5895857ac72..0bad32bfba9 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getPosts.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getPosts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { posts: AppBskyFeedDefs.PostView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getQuotes.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getQuotes.ts index afe599dce94..a0bdd075b14 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getQuotes.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getQuotes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -27,7 +27,6 @@ export interface OutputSchema { cid?: string cursor?: string posts: AppBskyFeedDefs.PostView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getRepostedBy.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getRepostedBy.ts index da59510e793..3c222f42ae1 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getRepostedBy.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getRepostedBy.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -27,7 +27,6 @@ export interface OutputSchema { cid?: string cursor?: string repostedBy: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts index b878f00e9c4..ccf2c4deb00 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getSuggestedFeeds.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/getTimeline.ts b/packages/pds/src/lexicon/types/app/bsky/feed/getTimeline.ts index 7eb11ed9637..ffd1908845e 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/getTimeline.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/getTimeline.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feed: AppBskyFeedDefs.FeedViewPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/like.ts b/packages/pds/src/lexicon/types/app/bsky/feed/like.ts index 118a1606100..8ced2a820c4 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/like.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/like.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.feed.like' export interface Record { + $type?: 'app.bsky.feed.like' | 'app.bsky.feed.like#main' subject: ComAtprotoRepoStrongRef.Main createdAt: string [k: string]: unknown diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/post.ts b/packages/pds/src/lexicon/types/app/bsky/feed/post.ts index b63e9ae63dd..2a96858ccc3 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/post.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/post.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyRichtextFacet from '../richtext/facet' import * as AppBskyEmbedImages from '../embed/images' import * as AppBskyEmbedVideo from '../embed/video' @@ -17,6 +17,7 @@ import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.feed.post' export interface Record { + $type?: 'app.bsky.feed.post' | 'app.bsky.feed.post#main' /** The primary post content. May be an empty string, if there are embeds. */ text: string /** DEPRECATED: replaced by app.bsky.richtext.facet. */ @@ -54,9 +55,9 @@ export function validateRecord(v: unknown) { } export interface ReplyRef { + $type?: 'app.bsky.feed.post#replyRef' root: ComAtprotoRepoStrongRef.Main parent: ComAtprotoRepoStrongRef.Main - [k: string]: unknown } export function isReplyRef( @@ -71,11 +72,11 @@ export function validateReplyRef(v: unknown) { /** 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 - [k: string]: unknown } export function isEntity( @@ -90,9 +91,9 @@ export function validateEntity(v: unknown) { /** 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 - [k: string]: unknown } export function isTextSlice( diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/postgate.ts b/packages/pds/src/lexicon/types/app/bsky/feed/postgate.ts index 659b5423b13..c1e135b4961 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/postgate.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/postgate.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.feed.postgate' export interface Record { + $type?: 'app.bsky.feed.postgate' | 'app.bsky.feed.postgate#main' createdAt: string /** Reference (AT-URI) to the post record. */ post: string @@ -30,7 +31,7 @@ export function validateRecord(v: unknown) { /** Disables embedding of this post. */ export interface DisableRule { - [k: string]: unknown + $type?: 'app.bsky.feed.postgate#disableRule' } export function isDisableRule(v: unknown): v is DisableRule & { diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/repost.ts b/packages/pds/src/lexicon/types/app/bsky/feed/repost.ts index baec71ae29b..3397c9db6e6 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/repost.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/repost.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' export const id = 'app.bsky.feed.repost' export interface Record { + $type?: 'app.bsky.feed.repost' | 'app.bsky.feed.repost#main' subject: ComAtprotoRepoStrongRef.Main createdAt: string [k: string]: unknown diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/searchPosts.ts b/packages/pds/src/lexicon/types/app/bsky/feed/searchPosts.ts index 9e8c6f2950c..e86fc686920 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/searchPosts.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/searchPosts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -44,7 +44,6 @@ export interface OutputSchema { /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ hitsTotal?: number posts: AppBskyFeedDefs.PostView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/sendInteractions.ts b/packages/pds/src/lexicon/types/app/bsky/feed/sendInteractions.ts index 793af1b716a..dc7fa7669ae 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/sendInteractions.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/sendInteractions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from './defs' @@ -15,12 +15,9 @@ export interface QueryParams {} export interface InputSchema { interactions: AppBskyFeedDefs.Interaction[] - [k: string]: unknown } -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export interface HandlerInput { encoding: 'application/json' diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/threadgate.ts b/packages/pds/src/lexicon/types/app/bsky/feed/threadgate.ts index cd424007087..1a776d4456a 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/threadgate.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/threadgate.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.feed.threadgate' export interface Record { + $type?: 'app.bsky.feed.threadgate' | 'app.bsky.feed.threadgate#main' /** Reference (AT-URI) to the post record. */ post: string allow?: ( @@ -35,7 +36,7 @@ export function validateRecord(v: unknown) { /** Allow replies from actors mentioned in your post. */ export interface MentionRule { - [k: string]: unknown + $type?: 'app.bsky.feed.threadgate#mentionRule' } export function isMentionRule(v: unknown): v is MentionRule & { @@ -53,7 +54,7 @@ export function validateMentionRule(v: unknown) { /** Allow replies from actors you follow. */ export interface FollowingRule { - [k: string]: unknown + $type?: 'app.bsky.feed.threadgate#followingRule' } export function isFollowingRule(v: unknown): v is FollowingRule & { @@ -71,8 +72,8 @@ export function validateFollowingRule(v: unknown) { /** Allow replies from actors on a list. */ export interface ListRule { + $type?: 'app.bsky.feed.threadgate#listRule' list: string - [k: string]: unknown } export function isListRule( diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/block.ts b/packages/pds/src/lexicon/types/app/bsky/graph/block.ts index 79f0c46305b..1575db8242f 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/block.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/block.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.graph.block' export interface Record { + $type?: 'app.bsky.graph.block' | 'app.bsky.graph.block#main' /** DID of the account to be blocked. */ subject: string createdAt: string diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/defs.ts b/packages/pds/src/lexicon/types/app/bsky/graph/defs.ts index 4f2e53f6c5f..d7b85120a8c 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/defs.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' import * as AppBskyActorDefs from '../actor/defs' import * as AppBskyRichtextFacet from '../richtext/facet' @@ -13,6 +13,7 @@ import * as AppBskyFeedDefs from '../feed/defs' export const id = 'app.bsky.graph.defs' export interface ListViewBasic { + $type?: 'app.bsky.graph.defs#listViewBasic' uri: string cid: string name: string @@ -22,7 +23,6 @@ export interface ListViewBasic { labels?: ComAtprotoLabelDefs.Label[] viewer?: ListViewerState indexedAt?: string - [k: string]: unknown } export function isListViewBasic(v: unknown): v is ListViewBasic & { @@ -39,6 +39,7 @@ export function validateListViewBasic(v: unknown) { } export interface ListView { + $type?: 'app.bsky.graph.defs#listView' uri: string cid: string creator: AppBskyActorDefs.ProfileView @@ -51,7 +52,6 @@ export interface ListView { labels?: ComAtprotoLabelDefs.Label[] viewer?: ListViewerState indexedAt: string - [k: string]: unknown } export function isListView( @@ -65,9 +65,9 @@ export function validateListView(v: unknown) { } export interface ListItemView { + $type?: 'app.bsky.graph.defs#listItemView' uri: string subject: AppBskyActorDefs.ProfileView - [k: string]: unknown } export function isListItemView( @@ -84,9 +84,10 @@ export function validateListItemView(v: unknown) { } export interface StarterPackView { + $type?: 'app.bsky.graph.defs#starterPackView' uri: string cid: string - record: {} + record: { [_ in string]: unknown } creator: AppBskyActorDefs.ProfileViewBasic list?: ListViewBasic listItemsSample?: ListItemView[] @@ -95,7 +96,6 @@ export interface StarterPackView { joinedAllTimeCount?: number labels?: ComAtprotoLabelDefs.Label[] indexedAt: string - [k: string]: unknown } export function isStarterPackView(v: unknown): v is StarterPackView & { @@ -112,16 +112,16 @@ export function validateStarterPackView(v: unknown) { } export interface StarterPackViewBasic { + $type?: 'app.bsky.graph.defs#starterPackViewBasic' uri: string cid: string - record: {} + record: { [_ in string]: unknown } creator: AppBskyActorDefs.ProfileViewBasic listItemCount?: number joinedWeekCount?: number joinedAllTimeCount?: number labels?: ComAtprotoLabelDefs.Label[] indexedAt: string - [k: string]: unknown } export function isStarterPackViewBasic( @@ -153,9 +153,9 @@ export const CURATELIST = 'app.bsky.graph.defs#curatelist' export const REFERENCELIST = 'app.bsky.graph.defs#referencelist' export interface ListViewerState { + $type?: 'app.bsky.graph.defs#listViewerState' muted?: boolean blocked?: string - [k: string]: unknown } export function isListViewerState(v: unknown): v is ListViewerState & { @@ -173,9 +173,9 @@ export function validateListViewerState(v: unknown) { /** indicates that a handle or DID could not be resolved */ export interface NotFoundActor { + $type?: 'app.bsky.graph.defs#notFoundActor' actor: string notFound: true - [k: string]: unknown } export function isNotFoundActor(v: unknown): v is NotFoundActor & { @@ -193,12 +193,12 @@ export function validateNotFoundActor(v: unknown) { /** 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 - [k: string]: unknown } export function isRelationship( diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/follow.ts b/packages/pds/src/lexicon/types/app/bsky/graph/follow.ts index 7da79cb6f6d..97da4da5437 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/follow.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/follow.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.graph.follow' export interface Record { + $type?: 'app.bsky.graph.follow' | 'app.bsky.graph.follow#main' subject: string createdAt: string [k: string]: unknown diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts index b43fa3f0e67..edae888075b 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string starterPacks: AppBskyGraphDefs.StarterPackViewBasic[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getBlocks.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getBlocks.ts index 97002ce1352..208512babca 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getBlocks.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getBlocks.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string blocks: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getFollowers.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getFollowers.ts index cbc561800b4..0004ccee43d 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getFollowers.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getFollowers.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -23,7 +23,6 @@ export interface OutputSchema { subject: AppBskyActorDefs.ProfileView cursor?: string followers: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getFollows.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getFollows.ts index 993a8fa5219..b41e25b6952 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getFollows.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getFollows.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -23,7 +23,6 @@ export interface OutputSchema { subject: AppBskyActorDefs.ProfileView cursor?: string follows: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts index 125939471e5..a225bd1ab34 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -23,7 +23,6 @@ export interface OutputSchema { subject: AppBskyActorDefs.ProfileView cursor?: string followers: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getList.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getList.ts index 1bbd4682300..5dba8af7234 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getList.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getList.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -24,7 +24,6 @@ export interface OutputSchema { cursor?: string list: AppBskyGraphDefs.ListView items: AppBskyGraphDefs.ListItemView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getListBlocks.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getListBlocks.ts index 4db65c33f29..efe19f9d420 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getListBlocks.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getListBlocks.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string lists: AppBskyGraphDefs.ListView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getListMutes.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getListMutes.ts index 59c1b6fe073..fee69ac07b8 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getListMutes.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getListMutes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string lists: AppBskyGraphDefs.ListView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getLists.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getLists.ts index 1b343188801..22db439e198 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getLists.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getLists.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string lists: AppBskyGraphDefs.ListView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getMutes.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getMutes.ts index d3d85056d5e..74921f90b0b 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getMutes.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getMutes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string mutes: AppBskyActorDefs.ProfileView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getRelationships.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getRelationships.ts index 1349f8a5bbf..eed1299cb69 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getRelationships.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getRelationships.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -27,7 +27,6 @@ export interface OutputSchema { | AppBskyGraphDefs.NotFoundActor | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getStarterPack.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getStarterPack.ts index 741176f0773..81bf23e8620 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getStarterPack.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getStarterPack.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { starterPack: AppBskyGraphDefs.StarterPackView - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getStarterPacks.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getStarterPacks.ts index 595ea704853..64e3cac88c2 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getStarterPacks.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getStarterPacks.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyGraphDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { starterPacks: AppBskyGraphDefs.StarterPackViewBasic[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts b/packages/pds/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts index 9aca4fc8c44..456997eba45 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/getSuggestedFollowsByActor.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' @@ -21,7 +21,6 @@ export interface OutputSchema { suggestions: AppBskyActorDefs.ProfileView[] /** If true, response has fallen-back to generic results, and is not scoped using relativeToDid */ isFallback?: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/list.ts b/packages/pds/src/lexicon/types/app/bsky/graph/list.ts index 4a5af8012f7..f00aaa02f5a 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/list.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/list.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyGraphDefs from './defs' import * as AppBskyRichtextFacet from '../richtext/facet' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' @@ -12,6 +12,7 @@ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.graph.list' export interface Record { + $type?: 'app.bsky.graph.list' | 'app.bsky.graph.list#main' purpose: AppBskyGraphDefs.ListPurpose /** Display name for list; can not be empty. */ name: string diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/listblock.ts b/packages/pds/src/lexicon/types/app/bsky/graph/listblock.ts index a1699eba67a..713cbba4269 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/listblock.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/listblock.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.graph.listblock' export interface Record { + $type?: 'app.bsky.graph.listblock' | 'app.bsky.graph.listblock#main' /** Reference (AT-URI) to the mod list record. */ subject: string createdAt: string diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/listitem.ts b/packages/pds/src/lexicon/types/app/bsky/graph/listitem.ts index 9be8287ce0e..08e8e4f5543 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/listitem.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/listitem.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.graph.listitem' export interface Record { + $type?: 'app.bsky.graph.listitem' | 'app.bsky.graph.listitem#main' /** The account which is included on the list. */ subject: string /** Reference (AT-URI) to the list record (app.bsky.graph.list). */ diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/muteActor.ts b/packages/pds/src/lexicon/types/app/bsky/graph/muteActor.ts index 302c7d4879a..92af6cda1d2 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/muteActor.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/muteActor.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.muteActor' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { actor: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/muteActorList.ts b/packages/pds/src/lexicon/types/app/bsky/graph/muteActorList.ts index 7e1d9d7e727..24abc1eaa8b 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/muteActorList.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/muteActorList.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.muteActorList' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { list: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/muteThread.ts b/packages/pds/src/lexicon/types/app/bsky/graph/muteThread.ts index 97b2937fb39..3bad99cbdbb 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/muteThread.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/muteThread.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.muteThread' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { root: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/starterpack.ts b/packages/pds/src/lexicon/types/app/bsky/graph/starterpack.ts index 0bfcb427ed3..5cb2a2e1c26 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/starterpack.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/starterpack.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyRichtextFacet from '../richtext/facet' export const id = 'app.bsky.graph.starterpack' export interface Record { + $type?: 'app.bsky.graph.starterpack' | 'app.bsky.graph.starterpack#main' /** Display name for starter pack; can not be empty. */ name: string description?: string @@ -32,8 +33,8 @@ export function validateRecord(v: unknown) { } export interface FeedItem { + $type?: 'app.bsky.graph.starterpack#feedItem' uri: string - [k: string]: unknown } export function isFeedItem( diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/unmuteActor.ts b/packages/pds/src/lexicon/types/app/bsky/graph/unmuteActor.ts index 77bb88083da..2d9feb63f5c 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/unmuteActor.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/unmuteActor.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.unmuteActor' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { actor: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/unmuteActorList.ts b/packages/pds/src/lexicon/types/app/bsky/graph/unmuteActorList.ts index 04a03b76764..583b5a38daa 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/unmuteActorList.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/unmuteActorList.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.unmuteActorList' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { list: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/app/bsky/graph/unmuteThread.ts b/packages/pds/src/lexicon/types/app/bsky/graph/unmuteThread.ts index 90e9234cda5..fce07aaa3e9 100644 --- a/packages/pds/src/lexicon/types/app/bsky/graph/unmuteThread.ts +++ b/packages/pds/src/lexicon/types/app/bsky/graph/unmuteThread.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.graph.unmuteThread' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { root: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/app/bsky/labeler/defs.ts b/packages/pds/src/lexicon/types/app/bsky/labeler/defs.ts index 02973fb6b9e..83ac570a432 100644 --- a/packages/pds/src/lexicon/types/app/bsky/labeler/defs.ts +++ b/packages/pds/src/lexicon/types/app/bsky/labeler/defs.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyActorDefs from '../actor/defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.labeler.defs' export interface LabelerView { + $type?: 'app.bsky.labeler.defs#labelerView' uri: string cid: string creator: AppBskyActorDefs.ProfileView @@ -18,7 +19,6 @@ export interface LabelerView { viewer?: LabelerViewerState indexedAt: string labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isLabelerView( @@ -35,6 +35,7 @@ export function validateLabelerView(v: unknown) { } export interface LabelerViewDetailed { + $type?: 'app.bsky.labeler.defs#labelerViewDetailed' uri: string cid: string creator: AppBskyActorDefs.ProfileView @@ -43,7 +44,6 @@ export interface LabelerViewDetailed { viewer?: LabelerViewerState indexedAt: string labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isLabelerViewDetailed(v: unknown): v is LabelerViewDetailed & { @@ -60,8 +60,8 @@ export function validateLabelerViewDetailed(v: unknown) { } export interface LabelerViewerState { + $type?: 'app.bsky.labeler.defs#labelerViewerState' like?: string - [k: string]: unknown } export function isLabelerViewerState(v: unknown): v is LabelerViewerState & { @@ -78,11 +78,11 @@ export function validateLabelerViewerState(v: unknown) { } 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[] - [k: string]: unknown } export function isLabelerPolicies(v: unknown): v is LabelerPolicies & { diff --git a/packages/pds/src/lexicon/types/app/bsky/labeler/getServices.ts b/packages/pds/src/lexicon/types/app/bsky/labeler/getServices.ts index dcc29c5f73f..aca7c6c61d3 100644 --- a/packages/pds/src/lexicon/types/app/bsky/labeler/getServices.ts +++ b/packages/pds/src/lexicon/types/app/bsky/labeler/getServices.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyLabelerDefs from './defs' @@ -24,7 +24,6 @@ export interface OutputSchema { | AppBskyLabelerDefs.LabelerViewDetailed | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/labeler/service.ts b/packages/pds/src/lexicon/types/app/bsky/labeler/service.ts index 8b91f65c304..82324693664 100644 --- a/packages/pds/src/lexicon/types/app/bsky/labeler/service.ts +++ b/packages/pds/src/lexicon/types/app/bsky/labeler/service.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyLabelerDefs from './defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'app.bsky.labeler.service' export interface Record { + $type?: 'app.bsky.labeler.service' | 'app.bsky.labeler.service#main' policies: AppBskyLabelerDefs.LabelerPolicies labels?: | ComAtprotoLabelDefs.SelfLabels diff --git a/packages/pds/src/lexicon/types/app/bsky/notification/getUnreadCount.ts b/packages/pds/src/lexicon/types/app/bsky/notification/getUnreadCount.ts index 37eac1bd1f1..9f3992a91c8 100644 --- a/packages/pds/src/lexicon/types/app/bsky/notification/getUnreadCount.ts +++ b/packages/pds/src/lexicon/types/app/bsky/notification/getUnreadCount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.notification.getUnreadCount' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { count: number - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/notification/listNotifications.ts b/packages/pds/src/lexicon/types/app/bsky/notification/listNotifications.ts index d4b68653ca5..0d8c35658af 100644 --- a/packages/pds/src/lexicon/types/app/bsky/notification/listNotifications.ts +++ b/packages/pds/src/lexicon/types/app/bsky/notification/listNotifications.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyActorDefs from '../actor/defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' @@ -26,7 +26,6 @@ export interface OutputSchema { notifications: Notification[] priority?: boolean seenAt?: string - [k: string]: unknown } export type HandlerInput = undefined @@ -55,6 +54,7 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Notification { + $type?: 'app.bsky.notification.listNotifications#notification' uri: string cid: string author: AppBskyActorDefs.ProfileView @@ -69,11 +69,10 @@ export interface Notification { | 'starterpack-joined' | (string & {}) reasonSubject?: string - record: {} + record: { [_ in string]: unknown } isRead: boolean indexedAt: string labels?: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isNotification(v: unknown): v is Notification & { diff --git a/packages/pds/src/lexicon/types/app/bsky/notification/putPreferences.ts b/packages/pds/src/lexicon/types/app/bsky/notification/putPreferences.ts index ad2f6aa4226..5ff2b706722 100644 --- a/packages/pds/src/lexicon/types/app/bsky/notification/putPreferences.ts +++ b/packages/pds/src/lexicon/types/app/bsky/notification/putPreferences.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.notification.putPreferences' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { priority: boolean - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/app/bsky/notification/registerPush.ts b/packages/pds/src/lexicon/types/app/bsky/notification/registerPush.ts index 3ffdf1b7b4f..7c7de7e2450 100644 --- a/packages/pds/src/lexicon/types/app/bsky/notification/registerPush.ts +++ b/packages/pds/src/lexicon/types/app/bsky/notification/registerPush.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.notification.registerPush' @@ -17,7 +17,6 @@ export interface InputSchema { token: string platform: 'ios' | 'android' | 'web' | (string & {}) appId: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/app/bsky/notification/updateSeen.ts b/packages/pds/src/lexicon/types/app/bsky/notification/updateSeen.ts index 1fbd2fe680c..f600ba2b573 100644 --- a/packages/pds/src/lexicon/types/app/bsky/notification/updateSeen.ts +++ b/packages/pds/src/lexicon/types/app/bsky/notification/updateSeen.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.notification.updateSeen' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { seenAt: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/app/bsky/richtext/facet.ts b/packages/pds/src/lexicon/types/app/bsky/richtext/facet.ts index 339f2fa2739..2fc31719525 100644 --- a/packages/pds/src/lexicon/types/app/bsky/richtext/facet.ts +++ b/packages/pds/src/lexicon/types/app/bsky/richtext/facet.ts @@ -4,15 +4,15 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.richtext.facet' /** Annotation of a sub-string within rich text. */ export interface Main { + $type?: 'app.bsky.richtext.facet' | 'app.bsky.richtext.facet#main' index: ByteSlice features: (Mention | Link | Tag | { $type: string; [k: string]: unknown })[] - [k: string]: unknown } export function isMain( @@ -27,8 +27,8 @@ export function validateMain(v: unknown) { /** 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 - [k: string]: unknown } export function isMention( @@ -43,8 +43,8 @@ export function validateMention(v: unknown) { /** 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 - [k: string]: unknown } export function isLink( @@ -59,8 +59,8 @@ export function validateLink(v: unknown) { /** 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 - [k: string]: unknown } export function isTag( @@ -75,9 +75,9 @@ export function validateTag(v: unknown) { /** 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 - [k: string]: unknown } export function isByteSlice( diff --git a/packages/pds/src/lexicon/types/app/bsky/unspecced/defs.ts b/packages/pds/src/lexicon/types/app/bsky/unspecced/defs.ts index f6fb3ac74d4..c5cde2205f4 100644 --- a/packages/pds/src/lexicon/types/app/bsky/unspecced/defs.ts +++ b/packages/pds/src/lexicon/types/app/bsky/unspecced/defs.ts @@ -4,13 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'app.bsky.unspecced.defs' export interface SkeletonSearchPost { + $type?: 'app.bsky.unspecced.defs#skeletonSearchPost' uri: string - [k: string]: unknown } export function isSkeletonSearchPost(v: unknown): v is SkeletonSearchPost & { @@ -27,8 +27,8 @@ export function validateSkeletonSearchPost(v: unknown) { } export interface SkeletonSearchActor { + $type?: 'app.bsky.unspecced.defs#skeletonSearchActor' did: string - [k: string]: unknown } export function isSkeletonSearchActor(v: unknown): v is SkeletonSearchActor & { diff --git a/packages/pds/src/lexicon/types/app/bsky/unspecced/getConfig.ts b/packages/pds/src/lexicon/types/app/bsky/unspecced/getConfig.ts index 78dbbe4e854..17459f72b3c 100644 --- a/packages/pds/src/lexicon/types/app/bsky/unspecced/getConfig.ts +++ b/packages/pds/src/lexicon/types/app/bsky/unspecced/getConfig.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.unspecced.getConfig' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { checkEmailConfirmed?: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts b/packages/pds/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts index 07b21eb7514..cfcebf099bf 100644 --- a/packages/pds/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts +++ b/packages/pds/src/lexicon/types/app/bsky/unspecced/getPopularFeedGenerators.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyFeedDefs from '../feed/defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string feeds: AppBskyFeedDefs.GeneratorView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts b/packages/pds/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts index adae4cbe67a..33ee7b00cbe 100644 --- a/packages/pds/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts +++ b/packages/pds/src/lexicon/types/app/bsky/unspecced/getSuggestionsSkeleton.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyUnspeccedDefs from './defs' @@ -27,7 +27,6 @@ export interface OutputSchema { 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 - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts b/packages/pds/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts index b7f9be1a008..9afa5d4d5f5 100644 --- a/packages/pds/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts +++ b/packages/pds/src/lexicon/types/app/bsky/unspecced/getTaggedSuggestions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.unspecced.getTaggedSuggestions' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { suggestions: Suggestion[] - [k: string]: unknown } export type HandlerInput = undefined @@ -45,10 +44,10 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Suggestion { + $type?: 'app.bsky.unspecced.getTaggedSuggestions#suggestion' tag: string subjectType: 'actor' | 'feed' | (string & {}) subject: string - [k: string]: unknown } export function isSuggestion(v: unknown): v is Suggestion & { diff --git a/packages/pds/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts b/packages/pds/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts index 9187623dab8..98eaccf12d7 100644 --- a/packages/pds/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts +++ b/packages/pds/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyUnspeccedDefs from './defs' @@ -30,7 +30,6 @@ export interface OutputSchema { /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ hitsTotal?: number actors: AppBskyUnspeccedDefs.SkeletonSearchActor[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts b/packages/pds/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts index f0c33731dfe..41425088a3d 100644 --- a/packages/pds/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts +++ b/packages/pds/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyUnspeccedDefs from './defs' @@ -46,7 +46,6 @@ export interface OutputSchema { /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ hitsTotal?: number posts: AppBskyUnspeccedDefs.SkeletonSearchPost[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/video/defs.ts b/packages/pds/src/lexicon/types/app/bsky/video/defs.ts index 3a709ce65ad..9c94df560db 100644 --- a/packages/pds/src/lexicon/types/app/bsky/video/defs.ts +++ b/packages/pds/src/lexicon/types/app/bsky/video/defs.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export 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. */ @@ -18,7 +19,6 @@ export interface JobStatus { blob?: BlobRef error?: string message?: string - [k: string]: unknown } export function isJobStatus( diff --git a/packages/pds/src/lexicon/types/app/bsky/video/getJobStatus.ts b/packages/pds/src/lexicon/types/app/bsky/video/getJobStatus.ts index f2479a16d50..b42395ca1e2 100644 --- a/packages/pds/src/lexicon/types/app/bsky/video/getJobStatus.ts +++ b/packages/pds/src/lexicon/types/app/bsky/video/getJobStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyVideoDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { jobStatus: AppBskyVideoDefs.JobStatus - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/video/getUploadLimits.ts b/packages/pds/src/lexicon/types/app/bsky/video/getUploadLimits.ts index cf280f19737..84faac95ab5 100644 --- a/packages/pds/src/lexicon/types/app/bsky/video/getUploadLimits.ts +++ b/packages/pds/src/lexicon/types/app/bsky/video/getUploadLimits.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'app.bsky.video.getUploadLimits' @@ -20,7 +20,6 @@ export interface OutputSchema { remainingDailyBytes?: number message?: string error?: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/app/bsky/video/uploadVideo.ts b/packages/pds/src/lexicon/types/app/bsky/video/uploadVideo.ts index 8de7d0595fe..8900d9f285a 100644 --- a/packages/pds/src/lexicon/types/app/bsky/video/uploadVideo.ts +++ b/packages/pds/src/lexicon/types/app/bsky/video/uploadVideo.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as AppBskyVideoDefs from './defs' @@ -18,7 +18,6 @@ export type InputSchema = string | Uint8Array | Blob export interface OutputSchema { jobStatus: AppBskyVideoDefs.JobStatus - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/chat/bsky/actor/declaration.ts b/packages/pds/src/lexicon/types/chat/bsky/actor/declaration.ts index 7314ce3f777..8728c035dce 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/actor/declaration.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/actor/declaration.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'chat.bsky.actor.declaration' export interface Record { + $type?: 'chat.bsky.actor.declaration' | 'chat.bsky.actor.declaration#main' allowIncoming: 'all' | 'none' | 'following' | (string & {}) [k: string]: unknown } diff --git a/packages/pds/src/lexicon/types/chat/bsky/actor/defs.ts b/packages/pds/src/lexicon/types/chat/bsky/actor/defs.ts index e53389afa10..7127a0c2061 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/actor/defs.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/actor/defs.ts @@ -4,13 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyActorDefs from '../../../app/bsky/actor/defs' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'chat.bsky.actor.defs' export interface ProfileViewBasic { + $type?: 'chat.bsky.actor.defs#profileViewBasic' did: string handle: string displayName?: string @@ -20,7 +21,6 @@ export interface ProfileViewBasic { labels?: ComAtprotoLabelDefs.Label[] /** Set to true when the actor cannot actively participate in converations */ chatDisabled?: boolean - [k: string]: unknown } export function isProfileViewBasic(v: unknown): v is ProfileViewBasic & { diff --git a/packages/pds/src/lexicon/types/chat/bsky/actor/deleteAccount.ts b/packages/pds/src/lexicon/types/chat/bsky/actor/deleteAccount.ts index 23e9e3572bf..fe776d7c8bf 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/actor/deleteAccount.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/actor/deleteAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.actor.deleteAccount' @@ -14,9 +14,7 @@ export interface QueryParams {} export type InputSchema = undefined -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/chat/bsky/actor/exportAccountData.ts b/packages/pds/src/lexicon/types/chat/bsky/actor/exportAccountData.ts index 44aa74540b1..ce29bfcefcb 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/actor/exportAccountData.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/actor/exportAccountData.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.actor.exportAccountData' diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/defs.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/defs.ts index 29da4f1ed94..4ccc43f11e5 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/defs.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyRichtextFacet from '../../../app/bsky/richtext/facet' import * as AppBskyEmbedRecord from '../../../app/bsky/embed/record' import * as ChatBskyActorDefs from '../actor/defs' @@ -12,10 +12,10 @@ import * as ChatBskyActorDefs from '../actor/defs' export const id = 'chat.bsky.convo.defs' export interface MessageRef { + $type?: 'chat.bsky.convo.defs#messageRef' did: string convoId: string messageId: string - [k: string]: unknown } export function isMessageRef( @@ -32,11 +32,11 @@ export function validateMessageRef(v: unknown) { } export interface MessageInput { + $type?: 'chat.bsky.convo.defs#messageInput' text: string /** Annotations of text (mentions, URLs, hashtags, etc) */ facets?: AppBskyRichtextFacet.Main[] embed?: AppBskyEmbedRecord.Main | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isMessageInput(v: unknown): v is MessageInput & { @@ -53,6 +53,7 @@ export function validateMessageInput(v: unknown) { } export interface MessageView { + $type?: 'chat.bsky.convo.defs#messageView' id: string rev: string text: string @@ -61,7 +62,6 @@ export interface MessageView { embed?: AppBskyEmbedRecord.View | { $type: string; [k: string]: unknown } sender: MessageViewSender sentAt: string - [k: string]: unknown } export function isMessageView( @@ -78,11 +78,11 @@ export function validateMessageView(v: unknown) { } export interface DeletedMessageView { + $type?: 'chat.bsky.convo.defs#deletedMessageView' id: string rev: string sender: MessageViewSender sentAt: string - [k: string]: unknown } export function isDeletedMessageView(v: unknown): v is DeletedMessageView & { @@ -99,8 +99,8 @@ export function validateDeletedMessageView(v: unknown) { } export interface MessageViewSender { + $type?: 'chat.bsky.convo.defs#messageViewSender' did: string - [k: string]: unknown } export function isMessageViewSender(v: unknown): v is MessageViewSender & { @@ -117,6 +117,7 @@ export function validateMessageViewSender(v: unknown) { } export interface ConvoView { + $type?: 'chat.bsky.convo.defs#convoView' id: string rev: string members: ChatBskyActorDefs.ProfileViewBasic[] @@ -127,7 +128,6 @@ export interface ConvoView { muted: boolean opened?: boolean unreadCount: number - [k: string]: unknown } export function isConvoView( @@ -141,9 +141,9 @@ export function validateConvoView(v: unknown) { } export interface LogBeginConvo { + $type?: 'chat.bsky.convo.defs#logBeginConvo' rev: string convoId: string - [k: string]: unknown } export function isLogBeginConvo(v: unknown): v is LogBeginConvo & { @@ -160,9 +160,9 @@ export function validateLogBeginConvo(v: unknown) { } export interface LogLeaveConvo { + $type?: 'chat.bsky.convo.defs#logLeaveConvo' rev: string convoId: string - [k: string]: unknown } export function isLogLeaveConvo(v: unknown): v is LogLeaveConvo & { @@ -179,13 +179,13 @@ export function validateLogLeaveConvo(v: unknown) { } export interface LogCreateMessage { + $type?: 'chat.bsky.convo.defs#logCreateMessage' rev: string convoId: string message: | MessageView | DeletedMessageView | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isLogCreateMessage(v: unknown): v is LogCreateMessage & { @@ -202,13 +202,13 @@ export function validateLogCreateMessage(v: unknown) { } export interface LogDeleteMessage { + $type?: 'chat.bsky.convo.defs#logDeleteMessage' rev: string convoId: string message: | MessageView | DeletedMessageView | { $type: string; [k: string]: unknown } - [k: string]: unknown } export function isLogDeleteMessage(v: unknown): v is LogDeleteMessage & { diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts index 3097dda17b7..29dca72f0d8 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -16,7 +16,6 @@ export interface QueryParams {} export interface InputSchema { convoId: string messageId: string - [k: string]: unknown } export type OutputSchema = ChatBskyConvoDefs.DeletedMessageView diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/getConvo.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/getConvo.ts index a0da707e4e3..62748ac8f5e 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/getConvo.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/getConvo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts index 3037df3634e..1dd9bf51e12 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/getLog.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/getLog.ts index e9e46c404f6..a3608e9b4bb 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/getLog.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/getLog.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -26,7 +26,6 @@ export interface OutputSchema { | ChatBskyConvoDefs.LogDeleteMessage | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/getMessages.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/getMessages.ts index a52f1e6273a..2c82e079299 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/getMessages.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/getMessages.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -26,7 +26,6 @@ export interface OutputSchema { | ChatBskyConvoDefs.DeletedMessageView | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/leaveConvo.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/leaveConvo.ts index 35b3789c53d..5d3caeb971b 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/leaveConvo.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/leaveConvo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.convo.leaveConvo' @@ -14,13 +14,11 @@ export interface QueryParams {} export interface InputSchema { convoId: string - [k: string]: unknown } export interface OutputSchema { convoId: string rev: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/listConvos.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/listConvos.ts index 29686f9e22e..218ac63024d 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/listConvos.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/listConvos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string convos: ChatBskyConvoDefs.ConvoView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/muteConvo.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/muteConvo.ts index 9259e02d05e..2cd58fb188c 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/muteConvo.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/muteConvo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { convoId: string - [k: string]: unknown } export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/sendMessage.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/sendMessage.ts index 220d415fc86..703bf2eb67e 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/sendMessage.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/sendMessage.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -16,7 +16,6 @@ export interface QueryParams {} export interface InputSchema { convoId: string message: ChatBskyConvoDefs.MessageInput - [k: string]: unknown } export type OutputSchema = ChatBskyConvoDefs.MessageView diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts index 78b65e9218b..c1efbff74b3 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { items: BatchItem[] - [k: string]: unknown } export interface OutputSchema { items: ChatBskyConvoDefs.MessageView[] - [k: string]: unknown } export interface HandlerInput { @@ -52,9 +50,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface BatchItem { + $type?: 'chat.bsky.convo.sendMessageBatch#batchItem' convoId: string message: ChatBskyConvoDefs.MessageInput - [k: string]: unknown } export function isBatchItem(v: unknown): v is BatchItem & { diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts index c27b96de1d6..ad8108d63b4 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { convoId: string - [k: string]: unknown } export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/chat/bsky/convo/updateRead.ts b/packages/pds/src/lexicon/types/chat/bsky/convo/updateRead.ts index ff79b5b9b57..b505ff08c30 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/convo/updateRead.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/convo/updateRead.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from './defs' @@ -16,12 +16,10 @@ export interface QueryParams {} export interface InputSchema { convoId: string messageId?: string - [k: string]: unknown } export interface OutputSchema { convo: ChatBskyConvoDefs.ConvoView - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts b/packages/pds/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts index 50e3605a964..29872766060 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.moderation.getActorMetadata' @@ -20,7 +20,6 @@ export interface OutputSchema { day: Metadata month: Metadata all: Metadata - [k: string]: unknown } export type HandlerInput = undefined @@ -49,11 +48,11 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Metadata { + $type?: 'chat.bsky.moderation.getActorMetadata#metadata' messagesSent: number messagesReceived: number convos: number convosStarted: number - [k: string]: unknown } export function isMetadata(v: unknown): v is Metadata & { diff --git a/packages/pds/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts b/packages/pds/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts index 127d408e0fa..71de12b77aa 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ChatBskyConvoDefs from '../convo/defs' @@ -27,7 +27,6 @@ export interface OutputSchema { | ChatBskyConvoDefs.DeletedMessageView | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts b/packages/pds/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts index 355c7968ff1..feef56ddb2d 100644 --- a/packages/pds/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts +++ b/packages/pds/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'chat.bsky.moderation.updateActorAccess' @@ -16,7 +16,6 @@ export interface InputSchema { actor: string allowAccess: boolean ref?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/defs.ts b/packages/pds/src/lexicon/types/com/atproto/admin/defs.ts index e9e29643b81..e43ce333edf 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/defs.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/defs.ts @@ -4,15 +4,15 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoServerDefs from '../server/defs' export const id = 'com.atproto.admin.defs' export interface StatusAttr { + $type?: 'com.atproto.admin.defs#statusAttr' applied: boolean ref?: string - [k: string]: unknown } export function isStatusAttr( @@ -29,10 +29,11 @@ export function validateStatusAttr(v: unknown) { } export interface AccountView { + $type?: 'com.atproto.admin.defs#accountView' did: string handle: string email?: string - relatedRecords?: {}[] + relatedRecords?: { [_ in string]: unknown }[] indexedAt: string invitedBy?: ComAtprotoServerDefs.InviteCode invites?: ComAtprotoServerDefs.InviteCode[] @@ -41,7 +42,6 @@ export interface AccountView { inviteNote?: string deactivatedAt?: string threatSignatures?: ThreatSignature[] - [k: string]: unknown } export function isAccountView(v: unknown): v is AccountView & { @@ -58,8 +58,8 @@ export function validateAccountView(v: unknown) { } export interface RepoRef { + $type?: 'com.atproto.admin.defs#repoRef' did: string - [k: string]: unknown } export function isRepoRef( @@ -73,10 +73,10 @@ export function validateRepoRef(v: unknown) { } export interface RepoBlobRef { + $type?: 'com.atproto.admin.defs#repoBlobRef' did: string cid: string recordUri?: string - [k: string]: unknown } export function isRepoBlobRef(v: unknown): v is RepoBlobRef & { @@ -93,9 +93,9 @@ export function validateRepoBlobRef(v: unknown) { } export interface ThreatSignature { + $type?: 'com.atproto.admin.defs#threatSignature' property: string value: string - [k: string]: unknown } export function isThreatSignature(v: unknown): v is ThreatSignature & { diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/deleteAccount.ts b/packages/pds/src/lexicon/types/com/atproto/admin/deleteAccount.ts index 10c10e11479..b89f7b3ef7b 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/deleteAccount.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/deleteAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.deleteAccount' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { did: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts b/packages/pds/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts index 4f32510bcc4..7e6489f0bfc 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.disableAccountInvites' @@ -16,7 +16,6 @@ export interface InputSchema { account: string /** Optional reason for disabled invites. */ note?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts b/packages/pds/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts index 8a0033e90a1..e1a77bf44b9 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/disableInviteCodes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.disableInviteCodes' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { codes?: string[] accounts?: string[] - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts b/packages/pds/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts index dc96903fcfc..dbf8968efb6 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.enableAccountInvites' @@ -16,7 +16,6 @@ export interface InputSchema { account: string /** Optional reason for enabled invites. */ note?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/getAccountInfo.ts b/packages/pds/src/lexicon/types/com/atproto/admin/getAccountInfo.ts index 9c4eab14e8f..dec940a0b05 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/getAccountInfo.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/getAccountInfo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/getAccountInfos.ts b/packages/pds/src/lexicon/types/com/atproto/admin/getAccountInfos.ts index d979bd557d5..c0fc90e9cd1 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/getAccountInfos.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/getAccountInfos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { infos: ComAtprotoAdminDefs.AccountView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/getInviteCodes.ts b/packages/pds/src/lexicon/types/com/atproto/admin/getInviteCodes.ts index a39c85de445..80a29cd38a7 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/getInviteCodes.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/getInviteCodes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoServerDefs from '../server/defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string codes: ComAtprotoServerDefs.InviteCode[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts b/packages/pds/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts index 517e9789a2f..4397af13aca 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' import * as ComAtprotoRepoStrongRef from '../repo/strongRef' @@ -28,7 +28,6 @@ export interface OutputSchema { | { $type: string; [k: string]: unknown } takedown?: ComAtprotoAdminDefs.StatusAttr deactivated?: ComAtprotoAdminDefs.StatusAttr - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/searchAccounts.ts b/packages/pds/src/lexicon/types/com/atproto/admin/searchAccounts.ts index 91ff4cbc93f..096bbed018b 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/searchAccounts.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/searchAccounts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string accounts: ComAtprotoAdminDefs.AccountView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/sendEmail.ts b/packages/pds/src/lexicon/types/com/atproto/admin/sendEmail.ts index b6072bce155..6189455fa53 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/sendEmail.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/sendEmail.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.sendEmail' @@ -19,12 +19,10 @@ export interface InputSchema { 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 - [k: string]: unknown } export interface OutputSchema { sent: boolean - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts b/packages/pds/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts index 2dd68717296..4a08416a98c 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/updateAccountEmail.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.updateAccountEmail' @@ -16,7 +16,6 @@ export interface InputSchema { /** The handle or DID of the repo. */ account: string email: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts b/packages/pds/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts index 95cde6f8d48..33e1198fcf4 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/updateAccountHandle.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.updateAccountHandle' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { did: string handle: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts b/packages/pds/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts index ba1ef25f620..5d7dc1233ba 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.admin.updateAccountPassword' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { did: string password: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts b/packages/pds/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts index ccd44f528cf..63f078b2320 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from './defs' import * as ComAtprotoRepoStrongRef from '../repo/strongRef' @@ -22,7 +22,6 @@ export interface InputSchema { | { $type: string; [k: string]: unknown } takedown?: ComAtprotoAdminDefs.StatusAttr deactivated?: ComAtprotoAdminDefs.StatusAttr - [k: string]: unknown } export interface OutputSchema { @@ -32,7 +31,6 @@ export interface OutputSchema { | ComAtprotoAdminDefs.RepoBlobRef | { $type: string; [k: string]: unknown } takedown?: ComAtprotoAdminDefs.StatusAttr - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts b/packages/pds/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts index d3926404ffe..8a2bee49e07 100644 --- a/packages/pds/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts +++ b/packages/pds/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.getRecommendedDidCredentials' @@ -18,9 +18,8 @@ export interface OutputSchema { /** Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs. */ rotationKeys?: string[] alsoKnownAs?: string[] - verificationMethods?: {} - services?: {} - [k: string]: unknown + verificationMethods?: { [_ in string]: unknown } + services?: { [_ in string]: unknown } } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts b/packages/pds/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts index cfe024ea3bd..d1cb7b2e70f 100644 --- a/packages/pds/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts +++ b/packages/pds/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.requestPlcOperationSignature' diff --git a/packages/pds/src/lexicon/types/com/atproto/identity/resolveHandle.ts b/packages/pds/src/lexicon/types/com/atproto/identity/resolveHandle.ts index 3d3accc304e..73872b1d714 100644 --- a/packages/pds/src/lexicon/types/com/atproto/identity/resolveHandle.ts +++ b/packages/pds/src/lexicon/types/com/atproto/identity/resolveHandle.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.resolveHandle' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { did: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/identity/signPlcOperation.ts b/packages/pds/src/lexicon/types/com/atproto/identity/signPlcOperation.ts index 4972bf51d53..df44d2b2f28 100644 --- a/packages/pds/src/lexicon/types/com/atproto/identity/signPlcOperation.ts +++ b/packages/pds/src/lexicon/types/com/atproto/identity/signPlcOperation.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.signPlcOperation' @@ -17,15 +17,13 @@ export interface InputSchema { token?: string rotationKeys?: string[] alsoKnownAs?: string[] - verificationMethods?: {} - services?: {} - [k: string]: unknown + verificationMethods?: { [_ in string]: unknown } + services?: { [_ in string]: unknown } } export interface OutputSchema { /** A signed DID PLC operation. */ - operation: {} - [k: string]: unknown + operation: { [_ in string]: unknown } } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts b/packages/pds/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts index 5c24a9ebe33..82a0b96c67f 100644 --- a/packages/pds/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts +++ b/packages/pds/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.submitPlcOperation' @@ -13,8 +13,7 @@ export const id = 'com.atproto.identity.submitPlcOperation' export interface QueryParams {} export interface InputSchema { - operation: {} - [k: string]: unknown + operation: { [_ in string]: unknown } } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/identity/updateHandle.ts b/packages/pds/src/lexicon/types/com/atproto/identity/updateHandle.ts index e34ab1caa01..069b1bcb2ae 100644 --- a/packages/pds/src/lexicon/types/com/atproto/identity/updateHandle.ts +++ b/packages/pds/src/lexicon/types/com/atproto/identity/updateHandle.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.identity.updateHandle' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { /** The new handle. */ handle: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/label/defs.ts b/packages/pds/src/lexicon/types/com/atproto/label/defs.ts index b51ef88d7c2..26114bf4897 100644 --- a/packages/pds/src/lexicon/types/com/atproto/label/defs.ts +++ b/packages/pds/src/lexicon/types/com/atproto/label/defs.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export 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. */ @@ -28,7 +29,6 @@ export interface Label { exp?: string /** Signature of dag-cbor encoded label. */ sig?: Uint8Array - [k: string]: unknown } export function isLabel( @@ -43,8 +43,8 @@ export function validateLabel(v: unknown) { /** Metadata tags on an atproto record, published by the author within the record. */ export interface SelfLabels { + $type?: 'com.atproto.label.defs#selfLabels' values: SelfLabel[] - [k: string]: unknown } export function isSelfLabels( @@ -62,9 +62,9 @@ export function validateSelfLabels(v: unknown) { /** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. */ export interface SelfLabel { + $type?: 'com.atproto.label.defs#selfLabel' /** The short string name of the value or type of this label. */ val: string - [k: string]: unknown } export function isSelfLabel( @@ -79,6 +79,7 @@ export function validateSelfLabel(v: unknown) { /** Declares a label value and its expected interpretations and behaviors. */ export interface LabelValueDefinition { + $type?: 'com.atproto.label.defs#labelValueDefinition' /** The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). */ identifier: string /** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. */ @@ -90,7 +91,6 @@ export interface LabelValueDefinition { /** Does the user need to have adult content enabled in order to configure this label? */ adultOnly?: boolean locales: LabelValueDefinitionStrings[] - [k: string]: unknown } export function isLabelValueDefinition( @@ -110,13 +110,13 @@ export function validateLabelValueDefinition(v: unknown) { /** Strings which describe the label in the UI, localized into a specific language. */ export interface LabelValueDefinitionStrings { + $type?: 'com.atproto.label.defs#labelValueDefinitionStrings' /** The code of the language these strings are written in. */ lang: string /** A short human-readable name for the label. */ name: string /** A longer description of what the label means and why it might be applied. */ description: string - [k: string]: unknown } export function isLabelValueDefinitionStrings( diff --git a/packages/pds/src/lexicon/types/com/atproto/label/queryLabels.ts b/packages/pds/src/lexicon/types/com/atproto/label/queryLabels.ts index e8d05b18ad3..11d46b522cb 100644 --- a/packages/pds/src/lexicon/types/com/atproto/label/queryLabels.ts +++ b/packages/pds/src/lexicon/types/com/atproto/label/queryLabels.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoLabelDefs from './defs' @@ -25,7 +25,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string labels: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/label/subscribeLabels.ts b/packages/pds/src/lexicon/types/com/atproto/label/subscribeLabels.ts index 71d05b72c3c..a6757ad54df 100644 --- a/packages/pds/src/lexicon/types/com/atproto/label/subscribeLabels.ts +++ b/packages/pds/src/lexicon/types/com/atproto/label/subscribeLabels.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, ErrorFrame } from '@atproto/xrpc-server' import { IncomingMessage } from 'http' import * as ComAtprotoLabelDefs from './defs' @@ -33,9 +33,9 @@ export type Handler = ( ) => AsyncIterable export interface Labels { + $type?: 'com.atproto.label.subscribeLabels#labels' seq: number labels: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export function isLabels(v: unknown): v is Labels & { @@ -49,9 +49,9 @@ export function validateLabels(v: unknown) { } export interface Info { + $type?: 'com.atproto.label.subscribeLabels#info' name: 'OutdatedCursor' | (string & {}) message?: string - [k: string]: unknown } export function isInfo( diff --git a/packages/pds/src/lexicon/types/com/atproto/moderation/createReport.ts b/packages/pds/src/lexicon/types/com/atproto/moderation/createReport.ts index 637e305f034..c8ea82a157c 100644 --- a/packages/pds/src/lexicon/types/com/atproto/moderation/createReport.ts +++ b/packages/pds/src/lexicon/types/com/atproto/moderation/createReport.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoModerationDefs from './defs' import * as ComAtprotoAdminDefs from '../admin/defs' @@ -23,7 +23,6 @@ export interface InputSchema { | ComAtprotoAdminDefs.RepoRef | ComAtprotoRepoStrongRef.Main | { $type: string; [k: string]: unknown } - [k: string]: unknown } export interface OutputSchema { @@ -36,7 +35,6 @@ export interface OutputSchema { | { $type: string; [k: string]: unknown } reportedBy: string createdAt: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/moderation/defs.ts b/packages/pds/src/lexicon/types/com/atproto/moderation/defs.ts index 19d3a6afc3a..fc43a9776d9 100644 --- a/packages/pds/src/lexicon/types/com/atproto/moderation/defs.ts +++ b/packages/pds/src/lexicon/types/com/atproto/moderation/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'com.atproto.moderation.defs' diff --git a/packages/pds/src/lexicon/types/com/atproto/repo/applyWrites.ts b/packages/pds/src/lexicon/types/com/atproto/repo/applyWrites.ts index f0a4a7051dc..b1e8796d166 100644 --- a/packages/pds/src/lexicon/types/com/atproto/repo/applyWrites.ts +++ b/packages/pds/src/lexicon/types/com/atproto/repo/applyWrites.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoRepoDefs from './defs' @@ -21,13 +21,11 @@ export interface InputSchema { writes: (Create | Update | Delete)[] /** If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { commit?: ComAtprotoRepoDefs.CommitMeta results?: (CreateResult | UpdateResult | DeleteResult)[] - [k: string]: unknown } export interface HandlerInput { @@ -61,10 +59,10 @@ export type Handler = ( /** Operation which creates a new record. */ export interface Create { + $type?: 'com.atproto.repo.applyWrites#create' collection: string rkey?: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export function isCreate( @@ -79,10 +77,10 @@ export function validateCreate(v: unknown) { /** Operation which updates an existing record. */ export interface Update { + $type?: 'com.atproto.repo.applyWrites#update' collection: string rkey: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export function isUpdate( @@ -97,9 +95,9 @@ export function validateUpdate(v: unknown) { /** Operation which deletes an existing record. */ export interface Delete { + $type?: 'com.atproto.repo.applyWrites#delete' collection: string rkey: string - [k: string]: unknown } export function isDelete( @@ -113,10 +111,10 @@ export function validateDelete(v: unknown) { } export interface CreateResult { + $type?: 'com.atproto.repo.applyWrites#createResult' uri: string cid: string validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export function isCreateResult(v: unknown): v is CreateResult & { @@ -133,10 +131,10 @@ export function validateCreateResult(v: unknown) { } export interface UpdateResult { + $type?: 'com.atproto.repo.applyWrites#updateResult' uri: string cid: string validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export function isUpdateResult(v: unknown): v is UpdateResult & { @@ -153,7 +151,7 @@ export function validateUpdateResult(v: unknown) { } export interface DeleteResult { - [k: string]: unknown + $type?: 'com.atproto.repo.applyWrites#deleteResult' } export function isDeleteResult(v: unknown): v is DeleteResult & { diff --git a/packages/pds/src/lexicon/types/com/atproto/repo/createRecord.ts b/packages/pds/src/lexicon/types/com/atproto/repo/createRecord.ts index 492e3048ed4..2f3614bd564 100644 --- a/packages/pds/src/lexicon/types/com/atproto/repo/createRecord.ts +++ b/packages/pds/src/lexicon/types/com/atproto/repo/createRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoRepoDefs from './defs' @@ -23,10 +23,9 @@ export interface InputSchema { /** 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. */ validate?: boolean /** The record itself. Must contain a $type field. */ - record: {} + record: { [_ in string]: unknown } /** Compare and swap with the previous commit by CID. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { @@ -34,7 +33,6 @@ export interface OutputSchema { cid: string commit?: ComAtprotoRepoDefs.CommitMeta validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/repo/defs.ts b/packages/pds/src/lexicon/types/com/atproto/repo/defs.ts index ea541bb4f91..b4667e3ce09 100644 --- a/packages/pds/src/lexicon/types/com/atproto/repo/defs.ts +++ b/packages/pds/src/lexicon/types/com/atproto/repo/defs.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'com.atproto.repo.defs' export interface CommitMeta { + $type?: 'com.atproto.repo.defs#commitMeta' cid: string rev: string - [k: string]: unknown } export function isCommitMeta( diff --git a/packages/pds/src/lexicon/types/com/atproto/repo/deleteRecord.ts b/packages/pds/src/lexicon/types/com/atproto/repo/deleteRecord.ts index ac54176bb9a..90d6a586362 100644 --- a/packages/pds/src/lexicon/types/com/atproto/repo/deleteRecord.ts +++ b/packages/pds/src/lexicon/types/com/atproto/repo/deleteRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoRepoDefs from './defs' @@ -24,12 +24,10 @@ export interface InputSchema { swapRecord?: string /** Compare and swap with the previous commit by CID. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { commit?: ComAtprotoRepoDefs.CommitMeta - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/repo/describeRepo.ts b/packages/pds/src/lexicon/types/com/atproto/repo/describeRepo.ts index f00bfad6834..4c78cc81d47 100644 --- a/packages/pds/src/lexicon/types/com/atproto/repo/describeRepo.ts +++ b/packages/pds/src/lexicon/types/com/atproto/repo/describeRepo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.describeRepo' @@ -21,12 +21,11 @@ export interface OutputSchema { handle: string did: string /** The complete DID document for this account. */ - didDoc: {} + didDoc: { [_ in string]: unknown } /** List of all the collections (NSIDs) for which this repo contains at least one record. */ collections: string[] /** Indicates if handle is currently valid (resolves bi-directionally) */ handleIsCorrect: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/repo/getRecord.ts b/packages/pds/src/lexicon/types/com/atproto/repo/getRecord.ts index f79ea793e77..bd1a84333c5 100644 --- a/packages/pds/src/lexicon/types/com/atproto/repo/getRecord.ts +++ b/packages/pds/src/lexicon/types/com/atproto/repo/getRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.getRecord' @@ -26,8 +26,7 @@ export type InputSchema = undefined export interface OutputSchema { uri: string cid?: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/repo/importRepo.ts b/packages/pds/src/lexicon/types/com/atproto/repo/importRepo.ts index 51c0d85a347..4054deb37c2 100644 --- a/packages/pds/src/lexicon/types/com/atproto/repo/importRepo.ts +++ b/packages/pds/src/lexicon/types/com/atproto/repo/importRepo.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.importRepo' diff --git a/packages/pds/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts b/packages/pds/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts index 517ce3e6bc1..0b33fb26306 100644 --- a/packages/pds/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts +++ b/packages/pds/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.listMissingBlobs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string blobs: RecordBlob[] - [k: string]: unknown } export type HandlerInput = undefined @@ -49,9 +48,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface RecordBlob { + $type?: 'com.atproto.repo.listMissingBlobs#recordBlob' cid: string recordUri: string - [k: string]: unknown } export function isRecordBlob(v: unknown): v is RecordBlob & { diff --git a/packages/pds/src/lexicon/types/com/atproto/repo/listRecords.ts b/packages/pds/src/lexicon/types/com/atproto/repo/listRecords.ts index b559aaf3f5c..c46478e5277 100644 --- a/packages/pds/src/lexicon/types/com/atproto/repo/listRecords.ts +++ b/packages/pds/src/lexicon/types/com/atproto/repo/listRecords.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.listRecords' @@ -31,7 +31,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string records: Record[] - [k: string]: unknown } export type HandlerInput = undefined @@ -60,10 +59,10 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Record { + $type?: 'com.atproto.repo.listRecords#record' uri: string cid: string - value: {} - [k: string]: unknown + value: { [_ in string]: unknown } } export function isRecord( diff --git a/packages/pds/src/lexicon/types/com/atproto/repo/putRecord.ts b/packages/pds/src/lexicon/types/com/atproto/repo/putRecord.ts index c5a23a1c583..2b6df533db4 100644 --- a/packages/pds/src/lexicon/types/com/atproto/repo/putRecord.ts +++ b/packages/pds/src/lexicon/types/com/atproto/repo/putRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoRepoDefs from './defs' @@ -23,12 +23,11 @@ export interface InputSchema { /** 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. */ validate?: boolean /** The record to write. */ - record: {} + record: { [_ in string]: unknown } /** Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation */ swapRecord?: string | null /** Compare and swap with the previous commit by CID. */ swapCommit?: string - [k: string]: unknown } export interface OutputSchema { @@ -36,7 +35,6 @@ export interface OutputSchema { cid: string commit?: ComAtprotoRepoDefs.CommitMeta validationStatus?: 'valid' | 'unknown' | (string & {}) - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/repo/strongRef.ts b/packages/pds/src/lexicon/types/com/atproto/repo/strongRef.ts index 0afb7bd7fa8..a984a5c929f 100644 --- a/packages/pds/src/lexicon/types/com/atproto/repo/strongRef.ts +++ b/packages/pds/src/lexicon/types/com/atproto/repo/strongRef.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'com.atproto.repo.strongRef' export interface Main { + $type?: 'com.atproto.repo.strongRef' | 'com.atproto.repo.strongRef#main' uri: string cid: string - [k: string]: unknown } export function isMain( diff --git a/packages/pds/src/lexicon/types/com/atproto/repo/uploadBlob.ts b/packages/pds/src/lexicon/types/com/atproto/repo/uploadBlob.ts index d31911aafe3..2c1852fb9b7 100644 --- a/packages/pds/src/lexicon/types/com/atproto/repo/uploadBlob.ts +++ b/packages/pds/src/lexicon/types/com/atproto/repo/uploadBlob.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.repo.uploadBlob' @@ -17,7 +17,6 @@ export type InputSchema = string | Uint8Array | Blob export interface OutputSchema { blob: BlobRef - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/activateAccount.ts b/packages/pds/src/lexicon/types/com/atproto/server/activateAccount.ts index fcadc8c2e62..e285e773122 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/activateAccount.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/activateAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.activateAccount' diff --git a/packages/pds/src/lexicon/types/com/atproto/server/checkAccountStatus.ts b/packages/pds/src/lexicon/types/com/atproto/server/checkAccountStatus.ts index 3d927cd3980..cf1e1390d00 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/checkAccountStatus.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/checkAccountStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.checkAccountStatus' @@ -24,7 +24,6 @@ export interface OutputSchema { privateStateValues: number expectedBlobs: number importedBlobs: number - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/server/confirmEmail.ts b/packages/pds/src/lexicon/types/com/atproto/server/confirmEmail.ts index 809a95a216b..d72997ec90a 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/confirmEmail.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/confirmEmail.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.confirmEmail' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { email: string token: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/createAccount.ts b/packages/pds/src/lexicon/types/com/atproto/server/createAccount.ts index 538e8cb28e7..1b8636d0207 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/createAccount.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/createAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createAccount' @@ -26,8 +26,7 @@ export interface InputSchema { /** DID PLC rotation key (aka, recovery key) to be included in PLC creation operation. */ recoveryKey?: string /** 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. */ - plcOp?: {} - [k: string]: unknown + plcOp?: { [_ in string]: unknown } } /** Account login session returned on successful account creation. */ @@ -38,8 +37,7 @@ export interface OutputSchema { /** The DID of the new account. */ did: string /** Complete DID document. */ - didDoc?: {} - [k: string]: unknown + didDoc?: { [_ in string]: unknown } } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/createAppPassword.ts b/packages/pds/src/lexicon/types/com/atproto/server/createAppPassword.ts index 22a46eab052..2725e0598b2 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/createAppPassword.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/createAppPassword.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createAppPassword' @@ -17,7 +17,6 @@ export interface InputSchema { name: string /** If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients. */ privileged?: boolean - [k: string]: unknown } export type OutputSchema = AppPassword @@ -52,11 +51,11 @@ export type Handler = ( ) => Promise | HandlerOutput export interface AppPassword { + $type?: 'com.atproto.server.createAppPassword#appPassword' name: string password: string createdAt: string privileged?: boolean - [k: string]: unknown } export function isAppPassword(v: unknown): v is AppPassword & { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/createInviteCode.ts b/packages/pds/src/lexicon/types/com/atproto/server/createInviteCode.ts index 7ac6989797f..0280eb95aca 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/createInviteCode.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/createInviteCode.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createInviteCode' @@ -15,12 +15,10 @@ export interface QueryParams {} export interface InputSchema { useCount: number forAccount?: string - [k: string]: unknown } export interface OutputSchema { code: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/createInviteCodes.ts b/packages/pds/src/lexicon/types/com/atproto/server/createInviteCodes.ts index 120d2ae637f..6b88193fe60 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/createInviteCodes.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/createInviteCodes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createInviteCodes' @@ -16,12 +16,10 @@ export interface InputSchema { codeCount: number useCount: number forAccounts?: string[] - [k: string]: unknown } export interface OutputSchema { codes: AccountCodes[] - [k: string]: unknown } export interface HandlerInput { @@ -53,9 +51,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface AccountCodes { + $type?: 'com.atproto.server.createInviteCodes#accountCodes' account: string codes: string[] - [k: string]: unknown } export function isAccountCodes(v: unknown): v is AccountCodes & { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/createSession.ts b/packages/pds/src/lexicon/types/com/atproto/server/createSession.ts index d2a4cbda1ed..efd3ee603a3 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/createSession.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/createSession.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.createSession' @@ -17,7 +17,6 @@ export interface InputSchema { identifier: string password: string authFactorToken?: string - [k: string]: unknown } export interface OutputSchema { @@ -25,14 +24,13 @@ export interface OutputSchema { refreshJwt: string handle: string did: string - didDoc?: {} + didDoc?: { [_ in string]: unknown } email?: string emailConfirmed?: boolean emailAuthFactor?: boolean active?: boolean /** 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. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/deactivateAccount.ts b/packages/pds/src/lexicon/types/com/atproto/server/deactivateAccount.ts index 0a52f27f203..36bd7a2a97e 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/deactivateAccount.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/deactivateAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.deactivateAccount' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { /** A recommendation to server as to how long they should hold onto the deactivated account before deleting. */ deleteAfter?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/defs.ts b/packages/pds/src/lexicon/types/com/atproto/server/defs.ts index 1e25a6e6a22..5eb80492ca3 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/defs.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/defs.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'com.atproto.server.defs' export interface InviteCode { + $type?: 'com.atproto.server.defs#inviteCode' code: string available: number disabled: boolean @@ -16,7 +17,6 @@ export interface InviteCode { createdBy: string createdAt: string uses: InviteCodeUse[] - [k: string]: unknown } export function isInviteCode( @@ -33,9 +33,9 @@ export function validateInviteCode(v: unknown) { } export interface InviteCodeUse { + $type?: 'com.atproto.server.defs#inviteCodeUse' usedBy: string usedAt: string - [k: string]: unknown } export function isInviteCodeUse(v: unknown): v is InviteCodeUse & { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/deleteAccount.ts b/packages/pds/src/lexicon/types/com/atproto/server/deleteAccount.ts index 49fd95f0561..6b1d89fea35 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/deleteAccount.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/deleteAccount.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.deleteAccount' @@ -16,7 +16,6 @@ export interface InputSchema { did: string password: string token: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/deleteSession.ts b/packages/pds/src/lexicon/types/com/atproto/server/deleteSession.ts index f54d8729338..11cd4281d85 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/deleteSession.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/deleteSession.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.deleteSession' diff --git a/packages/pds/src/lexicon/types/com/atproto/server/describeServer.ts b/packages/pds/src/lexicon/types/com/atproto/server/describeServer.ts index ffeeaeaaf73..50f085ac820 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/describeServer.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/describeServer.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.describeServer' @@ -24,7 +24,6 @@ export interface OutputSchema { links?: Links contact?: Contact did: string - [k: string]: unknown } export type HandlerInput = undefined @@ -53,9 +52,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Links { + $type?: 'com.atproto.server.describeServer#links' privacyPolicy?: string termsOfService?: string - [k: string]: unknown } export function isLinks( @@ -69,8 +68,8 @@ export function validateLinks(v: unknown) { } export interface Contact { + $type?: 'com.atproto.server.describeServer#contact' email?: string - [k: string]: unknown } export function isContact(v: unknown): v is Contact & { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts b/packages/pds/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts index b2d8d3d4bf0..4a653ad2bc3 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/getAccountInviteCodes.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoServerDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { codes: ComAtprotoServerDefs.InviteCode[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/server/getServiceAuth.ts b/packages/pds/src/lexicon/types/com/atproto/server/getServiceAuth.ts index 3761607e5fc..307b34abc18 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/getServiceAuth.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/getServiceAuth.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.getServiceAuth' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { token: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/server/getSession.ts b/packages/pds/src/lexicon/types/com/atproto/server/getSession.ts index 0e135e869f6..24baae80b75 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/getSession.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/getSession.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.getSession' @@ -20,11 +20,10 @@ export interface OutputSchema { email?: string emailConfirmed?: boolean emailAuthFactor?: boolean - didDoc?: {} + didDoc?: { [_ in string]: unknown } active?: boolean /** 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. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/server/listAppPasswords.ts b/packages/pds/src/lexicon/types/com/atproto/server/listAppPasswords.ts index daf997f7ad2..ad704069349 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/listAppPasswords.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/listAppPasswords.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.listAppPasswords' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { passwords: AppPassword[] - [k: string]: unknown } export type HandlerInput = undefined @@ -46,10 +45,10 @@ export type Handler = ( ) => Promise | HandlerOutput export interface AppPassword { + $type?: 'com.atproto.server.listAppPasswords#appPassword' name: string createdAt: string privileged?: boolean - [k: string]: unknown } export function isAppPassword(v: unknown): v is AppPassword & { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/refreshSession.ts b/packages/pds/src/lexicon/types/com/atproto/server/refreshSession.ts index 91d548f3464..07453ff3efe 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/refreshSession.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/refreshSession.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.refreshSession' @@ -19,11 +19,10 @@ export interface OutputSchema { refreshJwt: string handle: string did: string - didDoc?: {} + didDoc?: { [_ in string]: unknown } active?: boolean /** Hosting status of the account. If not specified, then assume 'active'. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/server/requestAccountDelete.ts b/packages/pds/src/lexicon/types/com/atproto/server/requestAccountDelete.ts index 5baa557a5f0..b6984683d3d 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/requestAccountDelete.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/requestAccountDelete.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.requestAccountDelete' diff --git a/packages/pds/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts b/packages/pds/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts index 21f3ee1b8f5..dc85343724f 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/requestEmailConfirmation.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.requestEmailConfirmation' diff --git a/packages/pds/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts b/packages/pds/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts index a0e4de30b40..500d16f0221 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/requestEmailUpdate.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.requestEmailUpdate' @@ -16,7 +16,6 @@ export type InputSchema = undefined export interface OutputSchema { tokenRequired: boolean - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/server/requestPasswordReset.ts b/packages/pds/src/lexicon/types/com/atproto/server/requestPasswordReset.ts index cbf4ea57211..e60518dade5 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/requestPasswordReset.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/requestPasswordReset.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.requestPasswordReset' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { email: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/reserveSigningKey.ts b/packages/pds/src/lexicon/types/com/atproto/server/reserveSigningKey.ts index 8042f4c69d0..a2a781136c4 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/reserveSigningKey.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/reserveSigningKey.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.reserveSigningKey' @@ -15,13 +15,11 @@ export interface QueryParams {} export interface InputSchema { /** The DID to reserve a key for. */ did?: string - [k: string]: unknown } export interface OutputSchema { /** The public key for the reserved signing key, in did:key serialization. */ signingKey: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/resetPassword.ts b/packages/pds/src/lexicon/types/com/atproto/server/resetPassword.ts index 15cf59e86a4..db521bfff8f 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/resetPassword.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/resetPassword.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.resetPassword' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { token: string password: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/revokeAppPassword.ts b/packages/pds/src/lexicon/types/com/atproto/server/revokeAppPassword.ts index 1cdbf9367d0..c0ab1fb0066 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/revokeAppPassword.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/revokeAppPassword.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.revokeAppPassword' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { name: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/server/updateEmail.ts b/packages/pds/src/lexicon/types/com/atproto/server/updateEmail.ts index 334d4759c16..814f63c3178 100644 --- a/packages/pds/src/lexicon/types/com/atproto/server/updateEmail.ts +++ b/packages/pds/src/lexicon/types/com/atproto/server/updateEmail.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.server.updateEmail' @@ -17,7 +17,6 @@ export interface InputSchema { emailAuthFactor?: boolean /** Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed. */ token?: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/getBlob.ts b/packages/pds/src/lexicon/types/com/atproto/sync/getBlob.ts index cba9708e6f9..730acfc2649 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/getBlob.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/getBlob.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getBlob' diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/getBlocks.ts b/packages/pds/src/lexicon/types/com/atproto/sync/getBlocks.ts index f298ef747f9..691aa82f29a 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/getBlocks.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/getBlocks.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getBlocks' diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/getCheckout.ts b/packages/pds/src/lexicon/types/com/atproto/sync/getCheckout.ts index 724e6908981..446c54b8aa5 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/getCheckout.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/getCheckout.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getCheckout' diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/getHead.ts b/packages/pds/src/lexicon/types/com/atproto/sync/getHead.ts index e6844bd8014..39d51046db9 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/getHead.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/getHead.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getHead' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { root: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/getLatestCommit.ts b/packages/pds/src/lexicon/types/com/atproto/sync/getLatestCommit.ts index ea409c07409..e3ace690bbc 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/getLatestCommit.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/getLatestCommit.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getLatestCommit' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cid: string rev: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/getRecord.ts b/packages/pds/src/lexicon/types/com/atproto/sync/getRecord.ts index e5611bad8e2..5e5c7c3730b 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/getRecord.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/getRecord.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getRecord' diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/getRepo.ts b/packages/pds/src/lexicon/types/com/atproto/sync/getRepo.ts index 4ec55779c56..93760a523dc 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/getRepo.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/getRepo.ts @@ -6,7 +6,7 @@ import stream from 'stream' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getRepo' diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/getRepoStatus.ts b/packages/pds/src/lexicon/types/com/atproto/sync/getRepoStatus.ts index 6118cc70510..aea17516b5c 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/getRepoStatus.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/getRepoStatus.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.getRepoStatus' @@ -24,7 +24,6 @@ export interface OutputSchema { status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) /** Optional field, the current rev of the repo, if active=true */ rev?: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/listBlobs.ts b/packages/pds/src/lexicon/types/com/atproto/sync/listBlobs.ts index 0a1149bef5c..c0a4594e640 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/listBlobs.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/listBlobs.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.listBlobs' @@ -24,7 +24,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string cids: string[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/listRepos.ts b/packages/pds/src/lexicon/types/com/atproto/sync/listRepos.ts index f5802c5b49c..45c4d5a242d 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/listRepos.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/listRepos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.listRepos' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string repos: Repo[] - [k: string]: unknown } export type HandlerInput = undefined @@ -49,6 +48,7 @@ export type Handler = ( ) => Promise | HandlerOutput export interface Repo { + $type?: 'com.atproto.sync.listRepos#repo' did: string /** Current repo commit CID */ head: string @@ -56,7 +56,6 @@ export interface Repo { active?: boolean /** 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. */ status?: 'takendown' | 'suspended' | 'deactivated' | (string & {}) - [k: string]: unknown } export function isRepo( diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts b/packages/pds/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts index 985d3a91bc0..a514a0581a6 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/notifyOfUpdate.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.notifyOfUpdate' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { /** Hostname of the current service (usually a PDS) that is notifying of update. */ hostname: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/requestCrawl.ts b/packages/pds/src/lexicon/types/com/atproto/sync/requestCrawl.ts index 48cd29206db..c44c5706def 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/requestCrawl.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/requestCrawl.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.sync.requestCrawl' @@ -15,7 +15,6 @@ export interface QueryParams {} export interface InputSchema { /** Hostname of the current service (eg, PDS) that is requesting to be crawled. */ hostname: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/com/atproto/sync/subscribeRepos.ts b/packages/pds/src/lexicon/types/com/atproto/sync/subscribeRepos.ts index 5c1e5546c67..e5186fe5173 100644 --- a/packages/pds/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +++ b/packages/pds/src/lexicon/types/com/atproto/sync/subscribeRepos.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, ErrorFrame } from '@atproto/xrpc-server' import { IncomingMessage } from 'http' @@ -38,6 +38,7 @@ export type Handler = ( /** 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. */ export interface Commit { + $type?: 'com.atproto.sync.subscribeRepos#commit' /** The stream sequence number of this message. */ seq: number /** DEPRECATED -- unused */ @@ -60,7 +61,6 @@ export interface Commit { blobs: CID[] /** Timestamp of when this message was originally broadcast. */ time: string - [k: string]: unknown } export function isCommit( @@ -75,12 +75,12 @@ export function validateCommit(v: unknown) { /** 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. */ export interface Identity { + $type?: 'com.atproto.sync.subscribeRepos#identity' seq: number did: string time: string /** 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. */ handle?: string - [k: string]: unknown } export function isIdentity(v: unknown): v is Identity & { @@ -95,6 +95,7 @@ export function validateIdentity(v: unknown) { /** 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. */ export interface Account { + $type?: 'com.atproto.sync.subscribeRepos#account' seq: number did: string time: string @@ -102,7 +103,6 @@ export interface Account { active: boolean /** If active=false, this optional field indicates a reason for why the account is not active. */ status?: 'takendown' | 'suspended' | 'deleted' | 'deactivated' | (string & {}) - [k: string]: unknown } export function isAccount(v: unknown): v is Account & { @@ -117,11 +117,11 @@ export function validateAccount(v: unknown) { /** DEPRECATED -- Use #identity event instead */ export interface Handle { + $type?: 'com.atproto.sync.subscribeRepos#handle' seq: number did: string handle: string time: string - [k: string]: unknown } export function isHandle( @@ -136,11 +136,11 @@ export function validateHandle(v: unknown) { /** DEPRECATED -- Use #account event instead */ export interface Migrate { + $type?: 'com.atproto.sync.subscribeRepos#migrate' seq: number did: string migrateTo: string | null time: string - [k: string]: unknown } export function isMigrate(v: unknown): v is Migrate & { @@ -155,10 +155,10 @@ export function validateMigrate(v: unknown) { /** DEPRECATED -- Use #account event instead */ export interface Tombstone { + $type?: 'com.atproto.sync.subscribeRepos#tombstone' seq: number did: string time: string - [k: string]: unknown } export function isTombstone(v: unknown): v is Tombstone & { @@ -172,9 +172,9 @@ export function validateTombstone(v: unknown) { } export interface Info { + $type?: 'com.atproto.sync.subscribeRepos#info' name: 'OutdatedCursor' | (string & {}) message?: string - [k: string]: unknown } export function isInfo( @@ -189,11 +189,11 @@ export function validateInfo(v: unknown) { /** A repo operation, ie a mutation of a single record. */ export interface RepoOp { + $type?: 'com.atproto.sync.subscribeRepos#repoOp' action: 'create' | 'update' | 'delete' | (string & {}) path: string /** For creates and updates, the new record CID. For deletions, null. */ cid: CID | null - [k: string]: unknown } export function isRepoOp( diff --git a/packages/pds/src/lexicon/types/com/atproto/temp/checkSignupQueue.ts b/packages/pds/src/lexicon/types/com/atproto/temp/checkSignupQueue.ts index 1d459f9b485..e765cb63993 100644 --- a/packages/pds/src/lexicon/types/com/atproto/temp/checkSignupQueue.ts +++ b/packages/pds/src/lexicon/types/com/atproto/temp/checkSignupQueue.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.temp.checkSignupQueue' @@ -18,7 +18,6 @@ export interface OutputSchema { activated: boolean placeInQueue?: number estimatedTimeMs?: number - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/temp/fetchLabels.ts b/packages/pds/src/lexicon/types/com/atproto/temp/fetchLabels.ts index 761449f9989..8f7e99bd241 100644 --- a/packages/pds/src/lexicon/types/com/atproto/temp/fetchLabels.ts +++ b/packages/pds/src/lexicon/types/com/atproto/temp/fetchLabels.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoLabelDefs from '../label/defs' @@ -20,7 +20,6 @@ export type InputSchema = undefined export interface OutputSchema { labels: ComAtprotoLabelDefs.Label[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts b/packages/pds/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts index 365429dca15..6a73668f25c 100644 --- a/packages/pds/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts +++ b/packages/pds/src/lexicon/types/com/atproto/temp/requestPhoneVerification.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'com.atproto.temp.requestPhoneVerification' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { phoneNumber: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/tools/ozone/communication/createTemplate.ts b/packages/pds/src/lexicon/types/tools/ozone/communication/createTemplate.ts index c204d4d0966..45443ec0160 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/communication/createTemplate.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/communication/createTemplate.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneCommunicationDefs from './defs' @@ -24,7 +24,6 @@ export interface InputSchema { lang?: string /** DID of the user who is creating the template. */ createdBy?: string - [k: string]: unknown } export type OutputSchema = ToolsOzoneCommunicationDefs.TemplateView diff --git a/packages/pds/src/lexicon/types/tools/ozone/communication/defs.ts b/packages/pds/src/lexicon/types/tools/ozone/communication/defs.ts index f3c11f32fab..e6198c68b64 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/communication/defs.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/communication/defs.ts @@ -4,11 +4,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'tools.ozone.communication.defs' export interface TemplateView { + $type?: 'tools.ozone.communication.defs#templateView' id: string /** Name of the template. */ name: string @@ -23,7 +24,6 @@ export interface TemplateView { lastUpdatedBy: string createdAt: string updatedAt: string - [k: string]: unknown } export function isTemplateView(v: unknown): v is TemplateView & { diff --git a/packages/pds/src/lexicon/types/tools/ozone/communication/deleteTemplate.ts b/packages/pds/src/lexicon/types/tools/ozone/communication/deleteTemplate.ts index a1ceb4fd69c..e1b8ffcb14a 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/communication/deleteTemplate.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/communication/deleteTemplate.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.communication.deleteTemplate' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { id: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/tools/ozone/communication/listTemplates.ts b/packages/pds/src/lexicon/types/tools/ozone/communication/listTemplates.ts index 7ba4567fce2..1f069cde1d3 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/communication/listTemplates.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/communication/listTemplates.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneCommunicationDefs from './defs' @@ -17,7 +17,6 @@ export type InputSchema = undefined export interface OutputSchema { communicationTemplates: ToolsOzoneCommunicationDefs.TemplateView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/tools/ozone/communication/updateTemplate.ts b/packages/pds/src/lexicon/types/tools/ozone/communication/updateTemplate.ts index 05b4cee8a92..c7980532853 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/communication/updateTemplate.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/communication/updateTemplate.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneCommunicationDefs from './defs' @@ -27,7 +27,6 @@ export interface InputSchema { /** DID of the user who is updating the template. */ updatedBy?: string disabled?: boolean - [k: string]: unknown } export type OutputSchema = ToolsOzoneCommunicationDefs.TemplateView diff --git a/packages/pds/src/lexicon/types/tools/ozone/moderation/defs.ts b/packages/pds/src/lexicon/types/tools/ozone/moderation/defs.ts index 7ce6811a13b..0559d5dd028 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/moderation/defs.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/moderation/defs.ts @@ -4,7 +4,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs' import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' import * as ChatBskyConvoDefs from '../../../chat/bsky/convo/defs' @@ -15,6 +15,7 @@ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' export const id = 'tools.ozone.moderation.defs' export interface ModEventView { + $type?: 'tools.ozone.moderation.defs#modEventView' id: number event: | ModEventTakedown @@ -46,7 +47,6 @@ export interface ModEventView { createdAt: string creatorHandle?: string subjectHandle?: string - [k: string]: unknown } export function isModEventView(v: unknown): v is ModEventView & { @@ -63,6 +63,7 @@ export function validateModEventView(v: unknown) { } export interface ModEventViewDetail { + $type?: 'tools.ozone.moderation.defs#modEventViewDetail' id: number event: | ModEventTakedown @@ -93,7 +94,6 @@ export interface ModEventViewDetail { subjectBlobs: BlobView[] createdBy: string createdAt: string - [k: string]: unknown } export function isModEventViewDetail(v: unknown): v is ModEventViewDetail & { @@ -110,6 +110,7 @@ export function validateModEventViewDetail(v: unknown) { } export interface SubjectStatusView { + $type?: 'tools.ozone.moderation.defs#subjectStatusView' id: number subject: | ComAtprotoAdminDefs.RepoRef @@ -140,7 +141,6 @@ export interface SubjectStatusView { appealed?: boolean suspendUntil?: string tags?: string[] - [k: string]: unknown } export function isSubjectStatusView(v: unknown): v is SubjectStatusView & { @@ -174,12 +174,12 @@ export const REVIEWNONE = 'tools.ozone.moderation.defs#reviewNone' /** Take down a subject permanently or temporarily */ export interface ModEventTakedown { + $type?: 'tools.ozone.moderation.defs#modEventTakedown' comment?: string /** Indicates how long the takedown should be in effect before automatically expiring. */ durationInHours?: number /** If true, all other reports on content authored by this account will be resolved (acknowledged). */ acknowledgeAccountSubjects?: boolean - [k: string]: unknown } export function isModEventTakedown(v: unknown): v is ModEventTakedown & { @@ -197,9 +197,9 @@ export function validateModEventTakedown(v: unknown) { /** Revert take down action on a subject */ export interface ModEventReverseTakedown { + $type?: 'tools.ozone.moderation.defs#modEventReverseTakedown' /** Describe reasoning behind the reversal. */ comment?: string - [k: string]: unknown } export function isModEventReverseTakedown( @@ -219,9 +219,9 @@ export function validateModEventReverseTakedown(v: unknown) { /** Resolve appeal on a subject */ export interface ModEventResolveAppeal { + $type?: 'tools.ozone.moderation.defs#modEventResolveAppeal' /** Describe resolution. */ comment?: string - [k: string]: unknown } export function isModEventResolveAppeal( @@ -241,10 +241,10 @@ export function validateModEventResolveAppeal(v: unknown) { /** Add a comment to a subject */ export interface ModEventComment { + $type?: 'tools.ozone.moderation.defs#modEventComment' comment: string /** Make the comment persistent on the subject */ sticky?: boolean - [k: string]: unknown } export function isModEventComment(v: unknown): v is ModEventComment & { @@ -262,11 +262,11 @@ export function validateModEventComment(v: unknown) { /** Report a subject */ export interface ModEventReport { + $type?: 'tools.ozone.moderation.defs#modEventReport' comment?: string /** 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. */ isReporterMuted?: boolean reportType: ComAtprotoModerationDefs.ReasonType - [k: string]: unknown } export function isModEventReport(v: unknown): v is ModEventReport & { @@ -284,10 +284,10 @@ export function validateModEventReport(v: unknown) { /** Apply/Negate labels on a subject */ export interface ModEventLabel { + $type?: 'tools.ozone.moderation.defs#modEventLabel' comment?: string createLabelVals: string[] negateLabelVals: string[] - [k: string]: unknown } export function isModEventLabel(v: unknown): v is ModEventLabel & { @@ -304,8 +304,8 @@ export function validateModEventLabel(v: unknown) { } export interface ModEventAcknowledge { + $type?: 'tools.ozone.moderation.defs#modEventAcknowledge' comment?: string - [k: string]: unknown } export function isModEventAcknowledge(v: unknown): v is ModEventAcknowledge & { @@ -322,8 +322,8 @@ export function validateModEventAcknowledge(v: unknown) { } export interface ModEventEscalate { + $type?: 'tools.ozone.moderation.defs#modEventEscalate' comment?: string - [k: string]: unknown } export function isModEventEscalate(v: unknown): v is ModEventEscalate & { @@ -341,10 +341,10 @@ export function validateModEventEscalate(v: unknown) { /** Mute incoming reports on a subject */ export interface ModEventMute { + $type?: 'tools.ozone.moderation.defs#modEventMute' comment?: string /** Indicates how long the subject should remain muted. */ durationInHours: number - [k: string]: unknown } export function isModEventMute(v: unknown): v is ModEventMute & { @@ -362,9 +362,9 @@ export function validateModEventMute(v: unknown) { /** Unmute action on a subject */ export interface ModEventUnmute { + $type?: 'tools.ozone.moderation.defs#modEventUnmute' /** Describe reasoning behind the reversal. */ comment?: string - [k: string]: unknown } export function isModEventUnmute(v: unknown): v is ModEventUnmute & { @@ -382,10 +382,10 @@ export function validateModEventUnmute(v: unknown) { /** Mute incoming reports from an account */ export interface ModEventMuteReporter { + $type?: 'tools.ozone.moderation.defs#modEventMuteReporter' comment?: string /** Indicates how long the account should remain muted. Falsy value here means a permanent mute. */ durationInHours?: number - [k: string]: unknown } export function isModEventMuteReporter( @@ -405,9 +405,9 @@ export function validateModEventMuteReporter(v: unknown) { /** Unmute incoming reports from an account */ export interface ModEventUnmuteReporter { + $type?: 'tools.ozone.moderation.defs#modEventUnmuteReporter' /** Describe reasoning behind the reversal. */ comment?: string - [k: string]: unknown } export function isModEventUnmuteReporter( @@ -427,13 +427,13 @@ export function validateModEventUnmuteReporter(v: unknown) { /** Keep a log of outgoing email to a user */ export interface ModEventEmail { + $type?: 'tools.ozone.moderation.defs#modEventEmail' /** The subject line of the email sent to the user. */ subjectLine: string /** The content of the email sent to the user. */ content?: string /** Additional comment about the outgoing comm. */ comment?: string - [k: string]: unknown } export function isModEventEmail(v: unknown): v is ModEventEmail & { @@ -451,8 +451,8 @@ export function validateModEventEmail(v: unknown) { /** Divert a record's blobs to a 3rd party service for further scanning/tagging */ export interface ModEventDivert { + $type?: 'tools.ozone.moderation.defs#modEventDivert' comment?: string - [k: string]: unknown } export function isModEventDivert(v: unknown): v is ModEventDivert & { @@ -470,13 +470,13 @@ export function validateModEventDivert(v: unknown) { /** Add/Remove a tag on a subject */ export interface ModEventTag { + $type?: 'tools.ozone.moderation.defs#modEventTag' /** Tags to be added to the subject. If already exists, won't be duplicated. */ add: string[] /** Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. */ remove: string[] /** Additional comment about added/removed tags. */ comment?: string - [k: string]: unknown } export function isModEventTag(v: unknown): v is ModEventTag & { @@ -494,6 +494,7 @@ export function validateModEventTag(v: unknown) { /** Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. */ export interface AccountEvent { + $type?: 'tools.ozone.moderation.defs#accountEvent' comment?: string /** Indicates that the account has a repository which can be fetched from the host that emitted this event. */ active: boolean @@ -506,7 +507,6 @@ export interface AccountEvent { | 'tombstoned' | (string & {}) timestamp: string - [k: string]: unknown } export function isAccountEvent(v: unknown): v is AccountEvent & { @@ -524,12 +524,12 @@ export function validateAccountEvent(v: unknown) { /** Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. */ export interface IdentityEvent { + $type?: 'tools.ozone.moderation.defs#identityEvent' comment?: string handle?: string pdsHost?: string tombstone?: boolean timestamp: string - [k: string]: unknown } export function isIdentityEvent(v: unknown): v is IdentityEvent & { @@ -547,11 +547,11 @@ export function validateIdentityEvent(v: unknown) { /** Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. */ export interface RecordEvent { + $type?: 'tools.ozone.moderation.defs#recordEvent' comment?: string op: 'create' | 'update' | 'delete' | (string & {}) cid?: string timestamp: string - [k: string]: unknown } export function isRecordEvent(v: unknown): v is RecordEvent & { @@ -568,10 +568,11 @@ export function validateRecordEvent(v: unknown) { } export interface RepoView { + $type?: 'tools.ozone.moderation.defs#repoView' did: string handle: string email?: string - relatedRecords: {}[] + relatedRecords: { [_ in string]: unknown }[] indexedAt: string moderation: Moderation invitedBy?: ComAtprotoServerDefs.InviteCode @@ -579,7 +580,6 @@ export interface RepoView { inviteNote?: string deactivatedAt?: string threatSignatures?: ComAtprotoAdminDefs.ThreatSignature[] - [k: string]: unknown } export function isRepoView( @@ -593,10 +593,11 @@ export function validateRepoView(v: unknown) { } export interface RepoViewDetail { + $type?: 'tools.ozone.moderation.defs#repoViewDetail' did: string handle: string email?: string - relatedRecords: {}[] + relatedRecords: { [_ in string]: unknown }[] indexedAt: string moderation: ModerationDetail labels?: ComAtprotoLabelDefs.Label[] @@ -607,7 +608,6 @@ export interface RepoViewDetail { emailConfirmedAt?: string deactivatedAt?: string threatSignatures?: ComAtprotoAdminDefs.ThreatSignature[] - [k: string]: unknown } export function isRepoViewDetail(v: unknown): v is RepoViewDetail & { @@ -624,8 +624,8 @@ export function validateRepoViewDetail(v: unknown) { } export interface RepoViewNotFound { + $type?: 'tools.ozone.moderation.defs#repoViewNotFound' did: string - [k: string]: unknown } export function isRepoViewNotFound(v: unknown): v is RepoViewNotFound & { @@ -642,14 +642,14 @@ export function validateRepoViewNotFound(v: unknown) { } export interface RecordView { + $type?: 'tools.ozone.moderation.defs#recordView' uri: string cid: string - value: {} + value: { [_ in string]: unknown } blobCids: string[] indexedAt: string moderation: Moderation repo: RepoView - [k: string]: unknown } export function isRecordView(v: unknown): v is RecordView & { @@ -666,15 +666,15 @@ export function validateRecordView(v: unknown) { } export interface RecordViewDetail { + $type?: 'tools.ozone.moderation.defs#recordViewDetail' uri: string cid: string - value: {} + value: { [_ in string]: unknown } blobs: BlobView[] labels?: ComAtprotoLabelDefs.Label[] indexedAt: string moderation: ModerationDetail repo: RepoView - [k: string]: unknown } export function isRecordViewDetail(v: unknown): v is RecordViewDetail & { @@ -691,8 +691,8 @@ export function validateRecordViewDetail(v: unknown) { } export interface RecordViewNotFound { + $type?: 'tools.ozone.moderation.defs#recordViewNotFound' uri: string - [k: string]: unknown } export function isRecordViewNotFound(v: unknown): v is RecordViewNotFound & { @@ -709,8 +709,8 @@ export function validateRecordViewNotFound(v: unknown) { } export interface Moderation { + $type?: 'tools.ozone.moderation.defs#moderation' subjectStatus?: SubjectStatusView - [k: string]: unknown } export function isModeration(v: unknown): v is Moderation & { @@ -727,8 +727,8 @@ export function validateModeration(v: unknown) { } export interface ModerationDetail { + $type?: 'tools.ozone.moderation.defs#moderationDetail' subjectStatus?: SubjectStatusView - [k: string]: unknown } export function isModerationDetail(v: unknown): v is ModerationDetail & { @@ -745,6 +745,7 @@ export function validateModerationDetail(v: unknown) { } export interface BlobView { + $type?: 'tools.ozone.moderation.defs#blobView' cid: string mimeType: string size: number @@ -754,7 +755,6 @@ export interface BlobView { | VideoDetails | { $type: string; [k: string]: unknown } moderation?: Moderation - [k: string]: unknown } export function isBlobView( @@ -768,9 +768,9 @@ export function validateBlobView(v: unknown) { } export interface ImageDetails { + $type?: 'tools.ozone.moderation.defs#imageDetails' width: number height: number - [k: string]: unknown } export function isImageDetails(v: unknown): v is ImageDetails & { @@ -787,10 +787,10 @@ export function validateImageDetails(v: unknown) { } export interface VideoDetails { + $type?: 'tools.ozone.moderation.defs#videoDetails' width: number height: number length: number - [k: string]: unknown } export function isVideoDetails(v: unknown): v is VideoDetails & { @@ -807,6 +807,7 @@ export function validateVideoDetails(v: unknown) { } export interface AccountHosting { + $type?: 'tools.ozone.moderation.defs#accountHosting' status: | 'takendown' | 'suspended' @@ -819,7 +820,6 @@ export interface AccountHosting { deletedAt?: string deactivatedAt?: string reactivatedAt?: string - [k: string]: unknown } export function isAccountHosting(v: unknown): v is AccountHosting & { @@ -836,11 +836,11 @@ export function validateAccountHosting(v: unknown) { } export interface RecordHosting { + $type?: 'tools.ozone.moderation.defs#recordHosting' status: 'deleted' | 'unknown' | (string & {}) updatedAt?: string createdAt?: string deletedAt?: string - [k: string]: unknown } export function isRecordHosting(v: unknown): v is RecordHosting & { diff --git a/packages/pds/src/lexicon/types/tools/ozone/moderation/emitEvent.ts b/packages/pds/src/lexicon/types/tools/ozone/moderation/emitEvent.ts index 5d41651d75c..11d075ff86a 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/moderation/emitEvent.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs' @@ -41,7 +41,6 @@ export interface InputSchema { | { $type: string; [k: string]: unknown } subjectBlobCids?: string[] createdBy: string - [k: string]: unknown } export type OutputSchema = ToolsOzoneModerationDefs.ModEventView diff --git a/packages/pds/src/lexicon/types/tools/ozone/moderation/getEvent.ts b/packages/pds/src/lexicon/types/tools/ozone/moderation/getEvent.ts index 0392a5d1ed8..5fd977684f5 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/moderation/getEvent.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/moderation/getEvent.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' diff --git a/packages/pds/src/lexicon/types/tools/ozone/moderation/getRecord.ts b/packages/pds/src/lexicon/types/tools/ozone/moderation/getRecord.ts index 8399a8cc5cf..e1741f54b65 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/moderation/getRecord.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/moderation/getRecord.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' diff --git a/packages/pds/src/lexicon/types/tools/ozone/moderation/getRecords.ts b/packages/pds/src/lexicon/types/tools/ozone/moderation/getRecords.ts index a15d946ae16..e73d8992ee6 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/moderation/getRecords.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/moderation/getRecords.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' @@ -23,7 +23,6 @@ export interface OutputSchema { | ToolsOzoneModerationDefs.RecordViewNotFound | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/tools/ozone/moderation/getRepo.ts b/packages/pds/src/lexicon/types/tools/ozone/moderation/getRepo.ts index e5d93c71324..ceeaebdfbab 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/moderation/getRepo.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/moderation/getRepo.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' diff --git a/packages/pds/src/lexicon/types/tools/ozone/moderation/getRepos.ts b/packages/pds/src/lexicon/types/tools/ozone/moderation/getRepos.ts index 808b8ae4ae4..76f4fd692af 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/moderation/getRepos.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/moderation/getRepos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' @@ -23,7 +23,6 @@ export interface OutputSchema { | ToolsOzoneModerationDefs.RepoViewNotFound | { $type: string; [k: string]: unknown } )[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/tools/ozone/moderation/queryEvents.ts b/packages/pds/src/lexicon/types/tools/ozone/moderation/queryEvents.ts index c388065c5c7..0b7a66ef9c3 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/moderation/queryEvents.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/moderation/queryEvents.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' @@ -50,7 +50,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string events: ToolsOzoneModerationDefs.ModEventView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts b/packages/pds/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts index 39ef2e8fb91..ce9b5c48f3c 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' @@ -66,7 +66,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string subjectStatuses: ToolsOzoneModerationDefs.SubjectStatusView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/tools/ozone/moderation/searchRepos.ts b/packages/pds/src/lexicon/types/tools/ozone/moderation/searchRepos.ts index e05919680f6..2cc3ea4e1b0 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/moderation/searchRepos.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/moderation/searchRepos.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneModerationDefs from './defs' @@ -24,7 +24,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string repos: ToolsOzoneModerationDefs.RepoView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/tools/ozone/server/getConfig.ts b/packages/pds/src/lexicon/types/tools/ozone/server/getConfig.ts index 8a1b5267386..d21f9c1c8f4 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/server/getConfig.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/server/getConfig.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.server.getConfig' @@ -20,7 +20,6 @@ export interface OutputSchema { blobDivert?: ServiceConfig chat?: ServiceConfig viewer?: ViewerConfig - [k: string]: unknown } export type HandlerInput = undefined @@ -49,8 +48,8 @@ export type Handler = ( ) => Promise | HandlerOutput export interface ServiceConfig { + $type?: 'tools.ozone.server.getConfig#serviceConfig' url?: string - [k: string]: unknown } export function isServiceConfig(v: unknown): v is ServiceConfig & { @@ -67,12 +66,12 @@ export function validateServiceConfig(v: unknown) { } export interface ViewerConfig { + $type?: 'tools.ozone.server.getConfig#viewerConfig' role?: | 'tools.ozone.team.defs#roleAdmin' | 'tools.ozone.team.defs#roleModerator' | 'tools.ozone.team.defs#roleTriage' | (string & {}) - [k: string]: unknown } export function isViewerConfig(v: unknown): v is ViewerConfig & { diff --git a/packages/pds/src/lexicon/types/tools/ozone/set/addValues.ts b/packages/pds/src/lexicon/types/tools/ozone/set/addValues.ts index 5fc024f43a5..4902bfb97be 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/set/addValues.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/set/addValues.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.set.addValues' @@ -17,7 +17,6 @@ export interface InputSchema { name: string /** Array of string values to add to the set */ values: string[] - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/tools/ozone/set/defs.ts b/packages/pds/src/lexicon/types/tools/ozone/set/defs.ts index 42d8b8408f4..3308c575feb 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/set/defs.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/set/defs.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'tools.ozone.set.defs' export interface Set { + $type?: 'tools.ozone.set.defs#set' name: string description?: string - [k: string]: unknown } export function isSet( @@ -25,12 +25,12 @@ export function validateSet(v: unknown) { } export interface SetView { + $type?: 'tools.ozone.set.defs#setView' name: string description?: string setSize: number createdAt: string updatedAt: string - [k: string]: unknown } export function isSetView( diff --git a/packages/pds/src/lexicon/types/tools/ozone/set/deleteSet.ts b/packages/pds/src/lexicon/types/tools/ozone/set/deleteSet.ts index 393e9d47eb4..f13dc04e9f7 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/set/deleteSet.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/set/deleteSet.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.set.deleteSet' @@ -15,12 +15,9 @@ export interface QueryParams {} export interface InputSchema { /** Name of the set to delete */ name: string - [k: string]: unknown } -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export interface HandlerInput { encoding: 'application/json' diff --git a/packages/pds/src/lexicon/types/tools/ozone/set/deleteValues.ts b/packages/pds/src/lexicon/types/tools/ozone/set/deleteValues.ts index 12edfa9462a..55176666a45 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/set/deleteValues.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/set/deleteValues.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.set.deleteValues' @@ -17,7 +17,6 @@ export interface InputSchema { name: string /** Array of string values to delete from the set */ values: string[] - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/tools/ozone/set/getValues.ts b/packages/pds/src/lexicon/types/tools/ozone/set/getValues.ts index 3d932525902..389750cfbc6 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/set/getValues.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/set/getValues.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneSetDefs from './defs' @@ -23,7 +23,6 @@ export interface OutputSchema { set: ToolsOzoneSetDefs.SetView values: string[] cursor?: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/tools/ozone/set/querySets.ts b/packages/pds/src/lexicon/types/tools/ozone/set/querySets.ts index 5f45a0c8d18..79a6575afab 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/set/querySets.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/set/querySets.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneSetDefs from './defs' @@ -25,7 +25,6 @@ export type InputSchema = undefined export interface OutputSchema { sets: ToolsOzoneSetDefs.SetView[] cursor?: string - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/tools/ozone/set/upsertSet.ts b/packages/pds/src/lexicon/types/tools/ozone/set/upsertSet.ts index c8993daf2cd..a562c68a43f 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/set/upsertSet.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/set/upsertSet.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneSetDefs from './defs' diff --git a/packages/pds/src/lexicon/types/tools/ozone/setting/defs.ts b/packages/pds/src/lexicon/types/tools/ozone/setting/defs.ts index f23a1d57b55..fb492a8c84d 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/setting/defs.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/setting/defs.ts @@ -4,14 +4,15 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'tools.ozone.setting.defs' export interface Option { + $type?: 'tools.ozone.setting.defs#option' key: string did: string - value: {} + value: { [_ in string]: unknown } description?: string createdAt?: string updatedAt?: string @@ -23,7 +24,6 @@ export interface Option { scope: 'instance' | 'personal' | (string & {}) createdBy: string lastUpdatedBy: string - [k: string]: unknown } export function isOption( diff --git a/packages/pds/src/lexicon/types/tools/ozone/setting/listOptions.ts b/packages/pds/src/lexicon/types/tools/ozone/setting/listOptions.ts index cc25208aff8..eee46b6a31d 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/setting/listOptions.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/setting/listOptions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneSettingDefs from './defs' @@ -26,7 +26,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string options: ToolsOzoneSettingDefs.Option[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/tools/ozone/setting/removeOptions.ts b/packages/pds/src/lexicon/types/tools/ozone/setting/removeOptions.ts index 1bd586ae568..3ad95ef86e6 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/setting/removeOptions.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/setting/removeOptions.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.setting.removeOptions' @@ -15,12 +15,9 @@ export interface QueryParams {} export interface InputSchema { keys: string[] scope: 'instance' | 'personal' | (string & {}) - [k: string]: unknown } -export interface OutputSchema { - [k: string]: unknown -} +export interface OutputSchema {} export interface HandlerInput { encoding: 'application/json' diff --git a/packages/pds/src/lexicon/types/tools/ozone/setting/upsertOption.ts b/packages/pds/src/lexicon/types/tools/ozone/setting/upsertOption.ts index 5bff052c953..aaf5e216ba4 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/setting/upsertOption.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/setting/upsertOption.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneSettingDefs from './defs' @@ -16,19 +16,17 @@ export interface QueryParams {} export interface InputSchema { key: string scope: 'instance' | 'personal' | (string & {}) - value: {} + value: { [_ in string]: unknown } description?: string managerRole?: | 'tools.ozone.team.defs#roleModerator' | 'tools.ozone.team.defs#roleTriage' | 'tools.ozone.team.defs#roleAdmin' | (string & {}) - [k: string]: unknown } export interface OutputSchema { option: ToolsOzoneSettingDefs.Option - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/tools/ozone/signature/defs.ts b/packages/pds/src/lexicon/types/tools/ozone/signature/defs.ts index 9dfcc4d533f..19f6f9f0d38 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/signature/defs.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/signature/defs.ts @@ -4,14 +4,14 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' export const id = 'tools.ozone.signature.defs' export interface SigDetail { + $type?: 'tools.ozone.signature.defs#sigDetail' property: string value: string - [k: string]: unknown } export function isSigDetail(v: unknown): v is SigDetail & { diff --git a/packages/pds/src/lexicon/types/tools/ozone/signature/findCorrelation.ts b/packages/pds/src/lexicon/types/tools/ozone/signature/findCorrelation.ts index b72d9a6ec93..7a2af9194fc 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/signature/findCorrelation.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/signature/findCorrelation.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneSignatureDefs from './defs' @@ -19,7 +19,6 @@ export type InputSchema = undefined export interface OutputSchema { details: ToolsOzoneSignatureDefs.SigDetail[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/tools/ozone/signature/findRelatedAccounts.ts b/packages/pds/src/lexicon/types/tools/ozone/signature/findRelatedAccounts.ts index 3d323702971..fab7954d914 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/signature/findRelatedAccounts.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/signature/findRelatedAccounts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs' import * as ToolsOzoneSignatureDefs from './defs' @@ -23,7 +23,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string accounts: RelatedAccount[] - [k: string]: unknown } export type HandlerInput = undefined @@ -52,9 +51,9 @@ export type Handler = ( ) => Promise | HandlerOutput export interface RelatedAccount { + $type?: 'tools.ozone.signature.findRelatedAccounts#relatedAccount' account: ComAtprotoAdminDefs.AccountView similarities?: ToolsOzoneSignatureDefs.SigDetail[] - [k: string]: unknown } export function isRelatedAccount(v: unknown): v is RelatedAccount & { diff --git a/packages/pds/src/lexicon/types/tools/ozone/signature/searchAccounts.ts b/packages/pds/src/lexicon/types/tools/ozone/signature/searchAccounts.ts index 3d91d44c7bd..b85d7a624b8 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/signature/searchAccounts.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/signature/searchAccounts.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ComAtprotoAdminDefs from '../../../com/atproto/admin/defs' @@ -22,7 +22,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string accounts: ComAtprotoAdminDefs.AccountView[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/tools/ozone/team/addMember.ts b/packages/pds/src/lexicon/types/tools/ozone/team/addMember.ts index bfa47301f80..5676f917795 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/team/addMember.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/team/addMember.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneTeamDefs from './defs' @@ -20,7 +20,6 @@ export interface InputSchema { | 'tools.ozone.team.defs#roleModerator' | 'tools.ozone.team.defs#roleTriage' | (string & {}) - [k: string]: unknown } export type OutputSchema = ToolsOzoneTeamDefs.Member diff --git a/packages/pds/src/lexicon/types/tools/ozone/team/defs.ts b/packages/pds/src/lexicon/types/tools/ozone/team/defs.ts index 72ded235a9e..f3b209f5b60 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/team/defs.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/team/defs.ts @@ -4,12 +4,13 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import * as AppBskyActorDefs from '../../../app/bsky/actor/defs' export const id = 'tools.ozone.team.defs' export interface Member { + $type?: 'tools.ozone.team.defs#member' did: string disabled?: boolean profile?: AppBskyActorDefs.ProfileViewDetailed @@ -21,7 +22,6 @@ export interface Member { | 'lex:tools.ozone.team.defs#roleModerator' | 'lex:tools.ozone.team.defs#roleTriage' | (string & {}) - [k: string]: unknown } export function isMember( diff --git a/packages/pds/src/lexicon/types/tools/ozone/team/deleteMember.ts b/packages/pds/src/lexicon/types/tools/ozone/team/deleteMember.ts index a53d277594e..325a567ca70 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/team/deleteMember.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/team/deleteMember.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' export const id = 'tools.ozone.team.deleteMember' @@ -14,7 +14,6 @@ export interface QueryParams {} export interface InputSchema { did: string - [k: string]: unknown } export interface HandlerInput { diff --git a/packages/pds/src/lexicon/types/tools/ozone/team/listMembers.ts b/packages/pds/src/lexicon/types/tools/ozone/team/listMembers.ts index 45d63f49928..2ceeff8a285 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/team/listMembers.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/team/listMembers.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneTeamDefs from './defs' @@ -21,7 +21,6 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string members: ToolsOzoneTeamDefs.Member[] - [k: string]: unknown } export type HandlerInput = undefined diff --git a/packages/pds/src/lexicon/types/tools/ozone/team/updateMember.ts b/packages/pds/src/lexicon/types/tools/ozone/team/updateMember.ts index 35b0d666ae9..776a4c0fde2 100644 --- a/packages/pds/src/lexicon/types/tools/ozone/team/updateMember.ts +++ b/packages/pds/src/lexicon/types/tools/ozone/team/updateMember.ts @@ -5,7 +5,7 @@ import express from 'express' import { ValidationResult, BlobRef } from '@atproto/lexicon' import { CID } from 'multiformats/cid' import { lexicons } from '../../../../lexicons' -import { $Type, is$typed } from '../../../../util' +import { $Type, is$typed, OmitKey } from '../../../../util' import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' import * as ToolsOzoneTeamDefs from './defs' @@ -21,7 +21,6 @@ export interface InputSchema { | 'tools.ozone.team.defs#roleModerator' | 'tools.ozone.team.defs#roleTriage' | (string & {}) - [k: string]: unknown } export type OutputSchema = ToolsOzoneTeamDefs.Member diff --git a/packages/pds/src/lexicon/util.ts b/packages/pds/src/lexicon/util.ts index c7e9539d1f1..238eabe8742 100644 --- a/packages/pds/src/lexicon/util.ts +++ b/packages/pds/src/lexicon/util.ts @@ -1,6 +1,10 @@ /** * GENERATED CODE - DO NOT MODIFY */ +export type OmitKey = { + [K2 in keyof T as K2 extends K ? never : K2]: T[K2] +} + export type $Type = Hash extends 'main' ? Id | `${Id}#${Hash}` : `${Id}#${Hash}`