@atproto/api
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -1,46 +0,27 @@ | ||
import { | ||
AtpServiceClient, | ||
ComAtprotoServerCreateAccount, | ||
ComAtprotoServerCreateSession, | ||
ComAtprotoServerGetSession, | ||
} from './client' | ||
import { | ||
AtpSessionData, | ||
AtpAgentCreateAccountOpts, | ||
AtpAgentLoginOpts, | ||
AtpAgentFetchHandler, | ||
AtpAgentGlobalOpts, | ||
AtpPersistSessionHandler, | ||
AtpAgentOpts, | ||
} from './types' | ||
import { AtpServiceClient, ComAtprotoServerCreateAccount, ComAtprotoServerCreateSession, ComAtprotoServerGetSession } from './client'; | ||
import { AtpSessionData, AtpAgentCreateAccountOpts, AtpAgentLoginOpts, AtpAgentFetchHandler, AtpAgentGlobalOpts, AtpPersistSessionHandler, AtpAgentOpts } from './types'; | ||
export declare class AtpAgent { | ||
service: URL | ||
api: AtpServiceClient | ||
session?: AtpSessionData | ||
private _baseClient | ||
private _persistSession? | ||
private _refreshSessionPromise | ||
get com(): import('./client').ComNS | ||
static fetch: AtpAgentFetchHandler | undefined | ||
static configure(opts: AtpAgentGlobalOpts): void | ||
constructor(opts: AtpAgentOpts) | ||
get hasSession(): boolean | ||
setPersistSessionHandler(handler?: AtpPersistSessionHandler): void | ||
createAccount( | ||
opts: AtpAgentCreateAccountOpts, | ||
): Promise<ComAtprotoServerCreateAccount.Response> | ||
login( | ||
opts: AtpAgentLoginOpts, | ||
): Promise<ComAtprotoServerCreateSession.Response> | ||
resumeSession( | ||
session: AtpSessionData, | ||
): Promise<ComAtprotoServerGetSession.Response> | ||
private _addAuthHeader | ||
private _fetch | ||
private _refreshSession | ||
private _refreshSessionInner | ||
uploadBlob: typeof this.api.com.atproto.repo.uploadBlob | ||
resolveHandle: typeof this.api.com.atproto.identity.resolveHandle | ||
updateHandle: typeof this.api.com.atproto.identity.updateHandle | ||
createModerationReport: typeof this.api.com.atproto.moderation.createReport | ||
service: URL; | ||
api: AtpServiceClient; | ||
session?: AtpSessionData; | ||
private _baseClient; | ||
private _persistSession?; | ||
private _refreshSessionPromise; | ||
get com(): import("./client").ComNS; | ||
static fetch: AtpAgentFetchHandler | undefined; | ||
static configure(opts: AtpAgentGlobalOpts): void; | ||
constructor(opts: AtpAgentOpts); | ||
get hasSession(): boolean; | ||
setPersistSessionHandler(handler?: AtpPersistSessionHandler): void; | ||
createAccount(opts: AtpAgentCreateAccountOpts): Promise<ComAtprotoServerCreateAccount.Response>; | ||
login(opts: AtpAgentLoginOpts): Promise<ComAtprotoServerCreateSession.Response>; | ||
resumeSession(session: AtpSessionData): Promise<ComAtprotoServerGetSession.Response>; | ||
private _addAuthHeader; | ||
private _fetch; | ||
private _refreshSession; | ||
private _refreshSessionInner; | ||
uploadBlob: typeof this.api.com.atproto.repo.uploadBlob; | ||
resolveHandle: typeof this.api.com.atproto.identity.resolveHandle; | ||
updateHandle: typeof this.api.com.atproto.identity.updateHandle; | ||
createModerationReport: typeof this.api.com.atproto.moderation.createReport; | ||
} |
@@ -1,64 +0,45 @@ | ||
import { AtpAgent } from './agent' | ||
import { AppBskyFeedPost, AppBskyActorProfile } from './client' | ||
import { AtpAgent } from './agent'; | ||
import { AppBskyFeedPost, AppBskyActorProfile } from './client'; | ||
export declare class BskyAgent extends AtpAgent { | ||
get app(): import('./client').AppNS | ||
getTimeline: typeof this.api.app.bsky.feed.getTimeline | ||
getAuthorFeed: typeof this.api.app.bsky.feed.getAuthorFeed | ||
getPostThread: typeof this.api.app.bsky.feed.getPostThread | ||
getPost: typeof this.api.app.bsky.feed.post.get | ||
getPosts: typeof this.api.app.bsky.feed.getPosts | ||
getLikes: typeof this.api.app.bsky.feed.getLikes | ||
getRepostedBy: typeof this.api.app.bsky.feed.getRepostedBy | ||
getFollows: typeof this.api.app.bsky.graph.getFollows | ||
getFollowers: typeof this.api.app.bsky.graph.getFollowers | ||
getProfile: typeof this.api.app.bsky.actor.getProfile | ||
getProfiles: typeof this.api.app.bsky.actor.getProfiles | ||
getSuggestions: typeof this.api.app.bsky.actor.getSuggestions | ||
searchActors: typeof this.api.app.bsky.actor.searchActors | ||
searchActorsTypeahead: typeof this.api.app.bsky.actor.searchActorsTypeahead | ||
listNotifications: typeof this.api.app.bsky.notification.listNotifications | ||
countUnreadNotifications: typeof this.api.app.bsky.notification.getUnreadCount | ||
post( | ||
record: Partial<AppBskyFeedPost.Record> & | ||
Omit<AppBskyFeedPost.Record, 'createdAt'>, | ||
): Promise<{ | ||
uri: string | ||
cid: string | ||
}> | ||
deletePost(postUri: string): Promise<void> | ||
like( | ||
uri: string, | ||
cid: string, | ||
): Promise<{ | ||
uri: string | ||
cid: string | ||
}> | ||
deleteLike(likeUri: string): Promise<void> | ||
repost( | ||
uri: string, | ||
cid: string, | ||
): Promise<{ | ||
uri: string | ||
cid: string | ||
}> | ||
deleteRepost(repostUri: string): Promise<void> | ||
follow(subjectDid: string): Promise<{ | ||
uri: string | ||
cid: string | ||
}> | ||
deleteFollow(followUri: string): Promise<void> | ||
upsertProfile( | ||
updateFn: ( | ||
existing: AppBskyActorProfile.Record | undefined, | ||
) => AppBskyActorProfile.Record | Promise<AppBskyActorProfile.Record>, | ||
): Promise<void> | ||
mute( | ||
actor: string, | ||
): Promise<import('./client/types/app/bsky/graph/muteActor').Response> | ||
unmute( | ||
actor: string, | ||
): Promise<import('./client/types/app/bsky/graph/unmuteActor').Response> | ||
updateSeenNotifications( | ||
seenAt?: string, | ||
): Promise<import('./client/types/app/bsky/notification/updateSeen').Response> | ||
get app(): import("./client").AppNS; | ||
getTimeline: typeof this.api.app.bsky.feed.getTimeline; | ||
getAuthorFeed: typeof this.api.app.bsky.feed.getAuthorFeed; | ||
getPostThread: typeof this.api.app.bsky.feed.getPostThread; | ||
getPost: typeof this.api.app.bsky.feed.post.get; | ||
getPosts: typeof this.api.app.bsky.feed.getPosts; | ||
getLikes: typeof this.api.app.bsky.feed.getLikes; | ||
getRepostedBy: typeof this.api.app.bsky.feed.getRepostedBy; | ||
getFollows: typeof this.api.app.bsky.graph.getFollows; | ||
getFollowers: typeof this.api.app.bsky.graph.getFollowers; | ||
getProfile: typeof this.api.app.bsky.actor.getProfile; | ||
getProfiles: typeof this.api.app.bsky.actor.getProfiles; | ||
getSuggestions: typeof this.api.app.bsky.actor.getSuggestions; | ||
searchActors: typeof this.api.app.bsky.actor.searchActors; | ||
searchActorsTypeahead: typeof this.api.app.bsky.actor.searchActorsTypeahead; | ||
listNotifications: typeof this.api.app.bsky.notification.listNotifications; | ||
countUnreadNotifications: typeof this.api.app.bsky.notification.getUnreadCount; | ||
post(record: Partial<AppBskyFeedPost.Record> & Omit<AppBskyFeedPost.Record, 'createdAt'>): Promise<{ | ||
uri: string; | ||
cid: string; | ||
}>; | ||
deletePost(postUri: string): Promise<void>; | ||
like(uri: string, cid: string): Promise<{ | ||
uri: string; | ||
cid: string; | ||
}>; | ||
deleteLike(likeUri: string): Promise<void>; | ||
repost(uri: string, cid: string): Promise<{ | ||
uri: string; | ||
cid: string; | ||
}>; | ||
deleteRepost(repostUri: string): Promise<void>; | ||
follow(subjectDid: string): Promise<{ | ||
uri: string; | ||
cid: string; | ||
}>; | ||
deleteFollow(followUri: string): Promise<void>; | ||
upsertProfile(updateFn: (existing: AppBskyActorProfile.Record | undefined) => AppBskyActorProfile.Record | Promise<AppBskyActorProfile.Record>): Promise<void>; | ||
mute(actor: string): Promise<import("./client/types/app/bsky/graph/muteActor").Response>; | ||
unmute(actor: string): Promise<import("./client/types/app/bsky/graph/unmuteActor").Response>; | ||
updateSeenNotifications(seenAt?: string): Promise<import("./client/types/app/bsky/notification/updateSeen").Response>; | ||
} |
@@ -1,88 +0,79 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' | ||
import * as AppBskyGraphDefs from '../graph/defs' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'; | ||
import * as AppBskyGraphDefs from '../graph/defs'; | ||
export interface ProfileViewBasic { | ||
did: string | ||
handle: string | ||
displayName?: string | ||
avatar?: string | ||
viewer?: ViewerState | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
[k: string]: unknown | ||
did: string; | ||
handle: string; | ||
displayName?: string; | ||
avatar?: string; | ||
viewer?: ViewerState; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isProfileViewBasic(v: unknown): v is ProfileViewBasic | ||
export declare function validateProfileViewBasic(v: unknown): ValidationResult | ||
export declare function isProfileViewBasic(v: unknown): v is ProfileViewBasic; | ||
export declare function validateProfileViewBasic(v: unknown): ValidationResult; | ||
export interface ProfileView { | ||
did: string | ||
handle: string | ||
displayName?: string | ||
description?: string | ||
avatar?: string | ||
indexedAt?: string | ||
viewer?: ViewerState | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
[k: string]: unknown | ||
did: string; | ||
handle: string; | ||
displayName?: string; | ||
description?: string; | ||
avatar?: string; | ||
indexedAt?: string; | ||
viewer?: ViewerState; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isProfileView(v: unknown): v is ProfileView | ||
export declare function validateProfileView(v: unknown): ValidationResult | ||
export declare function isProfileView(v: unknown): v is ProfileView; | ||
export declare function validateProfileView(v: unknown): ValidationResult; | ||
export interface ProfileViewDetailed { | ||
did: string | ||
handle: string | ||
displayName?: string | ||
description?: string | ||
avatar?: string | ||
banner?: string | ||
followersCount?: number | ||
followsCount?: number | ||
postsCount?: number | ||
indexedAt?: string | ||
viewer?: ViewerState | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
[k: string]: unknown | ||
did: string; | ||
handle: string; | ||
displayName?: string; | ||
description?: string; | ||
avatar?: string; | ||
banner?: string; | ||
followersCount?: number; | ||
followsCount?: number; | ||
postsCount?: number; | ||
indexedAt?: string; | ||
viewer?: ViewerState; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isProfileViewDetailed( | ||
v: unknown, | ||
): v is ProfileViewDetailed | ||
export declare function validateProfileViewDetailed( | ||
v: unknown, | ||
): ValidationResult | ||
export declare function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed; | ||
export declare function validateProfileViewDetailed(v: unknown): ValidationResult; | ||
export interface ViewerState { | ||
muted?: boolean | ||
mutedByList?: AppBskyGraphDefs.ListViewBasic | ||
blockedBy?: boolean | ||
blocking?: string | ||
following?: string | ||
followedBy?: string | ||
[k: string]: unknown | ||
muted?: boolean; | ||
mutedByList?: AppBskyGraphDefs.ListViewBasic; | ||
blockedBy?: boolean; | ||
blocking?: string; | ||
following?: string; | ||
followedBy?: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isViewerState(v: unknown): v is ViewerState | ||
export declare function validateViewerState(v: unknown): ValidationResult | ||
export declare type Preferences = ( | ||
| AdultContentPref | ||
| ContentLabelPref | ||
| SavedFeedsPref | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
)[] | ||
export declare function isViewerState(v: unknown): v is ViewerState; | ||
export declare function validateViewerState(v: unknown): ValidationResult; | ||
export declare type Preferences = (AdultContentPref | ContentLabelPref | SavedFeedsPref | { | ||
$type: string; | ||
[k: string]: unknown; | ||
})[]; | ||
export interface AdultContentPref { | ||
enabled: boolean | ||
[k: string]: unknown | ||
enabled: boolean; | ||
[k: string]: unknown; | ||
} | ||
export declare function isAdultContentPref(v: unknown): v is AdultContentPref | ||
export declare function validateAdultContentPref(v: unknown): ValidationResult | ||
export declare function isAdultContentPref(v: unknown): v is AdultContentPref; | ||
export declare function validateAdultContentPref(v: unknown): ValidationResult; | ||
export interface ContentLabelPref { | ||
label: string | ||
visibility: 'show' | 'warn' | 'hide' | (string & {}) | ||
[k: string]: unknown | ||
label: string; | ||
visibility: 'show' | 'warn' | 'hide' | (string & {}); | ||
[k: string]: unknown; | ||
} | ||
export declare function isContentLabelPref(v: unknown): v is ContentLabelPref | ||
export declare function validateContentLabelPref(v: unknown): ValidationResult | ||
export declare function isContentLabelPref(v: unknown): v is ContentLabelPref; | ||
export declare function validateContentLabelPref(v: unknown): ValidationResult; | ||
export interface SavedFeedsPref { | ||
pinned: string[] | ||
saved: string[] | ||
[k: string]: unknown | ||
pinned: string[]; | ||
saved: string[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isSavedFeedsPref(v: unknown): v is SavedFeedsPref | ||
export declare function validateSavedFeedsPref(v: unknown): ValidationResult | ||
export declare function isSavedFeedsPref(v: unknown): v is SavedFeedsPref; | ||
export declare function validateSavedFeedsPref(v: unknown): ValidationResult; |
@@ -1,31 +0,31 @@ | ||
import { ValidationResult, BlobRef } from '@atproto/lexicon' | ||
import { ValidationResult, BlobRef } from '@atproto/lexicon'; | ||
export interface Main { | ||
external: External | ||
[k: string]: unknown | ||
external: External; | ||
[k: string]: unknown; | ||
} | ||
export declare function isMain(v: unknown): v is Main | ||
export declare function validateMain(v: unknown): ValidationResult | ||
export declare function isMain(v: unknown): v is Main; | ||
export declare function validateMain(v: unknown): ValidationResult; | ||
export interface External { | ||
uri: string | ||
title: string | ||
description: string | ||
thumb?: BlobRef | ||
[k: string]: unknown | ||
uri: string; | ||
title: string; | ||
description: string; | ||
thumb?: BlobRef; | ||
[k: string]: unknown; | ||
} | ||
export declare function isExternal(v: unknown): v is External | ||
export declare function validateExternal(v: unknown): ValidationResult | ||
export declare function isExternal(v: unknown): v is External; | ||
export declare function validateExternal(v: unknown): ValidationResult; | ||
export interface View { | ||
external: ViewExternal | ||
[k: string]: unknown | ||
external: ViewExternal; | ||
[k: string]: unknown; | ||
} | ||
export declare function isView(v: unknown): v is View | ||
export declare function validateView(v: unknown): ValidationResult | ||
export declare function isView(v: unknown): v is View; | ||
export declare function validateView(v: unknown): ValidationResult; | ||
export interface ViewExternal { | ||
uri: string | ||
title: string | ||
description: string | ||
thumb?: string | ||
[k: string]: unknown | ||
uri: string; | ||
title: string; | ||
description: string; | ||
thumb?: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isViewExternal(v: unknown): v is ViewExternal | ||
export declare function validateViewExternal(v: unknown): ValidationResult | ||
export declare function isViewExternal(v: unknown): v is ViewExternal; | ||
export declare function validateViewExternal(v: unknown): ValidationResult; |
@@ -1,28 +0,28 @@ | ||
import { ValidationResult, BlobRef } from '@atproto/lexicon' | ||
import { ValidationResult, BlobRef } from '@atproto/lexicon'; | ||
export interface Main { | ||
images: Image[] | ||
[k: string]: unknown | ||
images: Image[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isMain(v: unknown): v is Main | ||
export declare function validateMain(v: unknown): ValidationResult | ||
export declare function isMain(v: unknown): v is Main; | ||
export declare function validateMain(v: unknown): ValidationResult; | ||
export interface Image { | ||
image: BlobRef | ||
alt: string | ||
[k: string]: unknown | ||
image: BlobRef; | ||
alt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isImage(v: unknown): v is Image | ||
export declare function validateImage(v: unknown): ValidationResult | ||
export declare function isImage(v: unknown): v is Image; | ||
export declare function validateImage(v: unknown): ValidationResult; | ||
export interface View { | ||
images: ViewImage[] | ||
[k: string]: unknown | ||
images: ViewImage[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isView(v: unknown): v is View | ||
export declare function validateView(v: unknown): ValidationResult | ||
export declare function isView(v: unknown): v is View; | ||
export declare function validateView(v: unknown): ValidationResult; | ||
export interface ViewImage { | ||
thumb: string | ||
fullsize: string | ||
alt: string | ||
[k: string]: unknown | ||
thumb: string; | ||
fullsize: string; | ||
alt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isViewImage(v: unknown): v is ViewImage | ||
export declare function validateViewImage(v: unknown): ValidationResult | ||
export declare function isViewImage(v: unknown): v is ViewImage; | ||
export declare function validateViewImage(v: unknown): ValidationResult; |
@@ -1,63 +0,51 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' | ||
import * as AppBskyFeedDefs from '../feed/defs' | ||
import * as AppBskyGraphDefs from '../graph/defs' | ||
import * as AppBskyActorDefs from '../actor/defs' | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' | ||
import * as AppBskyEmbedImages from './images' | ||
import * as AppBskyEmbedExternal from './external' | ||
import * as AppBskyEmbedRecordWithMedia from './recordWithMedia' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'; | ||
import * as AppBskyFeedDefs from '../feed/defs'; | ||
import * as AppBskyGraphDefs from '../graph/defs'; | ||
import * as AppBskyActorDefs from '../actor/defs'; | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'; | ||
import * as AppBskyEmbedImages from './images'; | ||
import * as AppBskyEmbedExternal from './external'; | ||
import * as AppBskyEmbedRecordWithMedia from './recordWithMedia'; | ||
export interface Main { | ||
record: ComAtprotoRepoStrongRef.Main | ||
[k: string]: unknown | ||
record: ComAtprotoRepoStrongRef.Main; | ||
[k: string]: unknown; | ||
} | ||
export declare function isMain(v: unknown): v is Main | ||
export declare function validateMain(v: unknown): ValidationResult | ||
export declare function isMain(v: unknown): v is Main; | ||
export declare function validateMain(v: unknown): ValidationResult; | ||
export interface View { | ||
record: | ||
| ViewRecord | ||
| ViewNotFound | ||
| ViewBlocked | ||
| AppBskyFeedDefs.GeneratorView | ||
| AppBskyGraphDefs.ListView | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
record: ViewRecord | ViewNotFound | ViewBlocked | AppBskyFeedDefs.GeneratorView | AppBskyGraphDefs.ListView | { | ||
$type: string; | ||
[k: string]: unknown; | ||
}; | ||
[k: string]: unknown; | ||
} | ||
export declare function isView(v: unknown): v is View | ||
export declare function validateView(v: unknown): ValidationResult | ||
export declare function isView(v: unknown): v is View; | ||
export declare function validateView(v: unknown): ValidationResult; | ||
export interface ViewRecord { | ||
uri: string | ||
cid: string | ||
author: AppBskyActorDefs.ProfileViewBasic | ||
value: {} | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
embeds?: ( | ||
| AppBskyEmbedImages.View | ||
| AppBskyEmbedExternal.View | ||
| View | ||
| AppBskyEmbedRecordWithMedia.View | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
)[] | ||
indexedAt: string | ||
[k: string]: unknown | ||
uri: string; | ||
cid: string; | ||
author: AppBskyActorDefs.ProfileViewBasic; | ||
value: {}; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
embeds?: (AppBskyEmbedImages.View | AppBskyEmbedExternal.View | View | AppBskyEmbedRecordWithMedia.View | { | ||
$type: string; | ||
[k: string]: unknown; | ||
})[]; | ||
indexedAt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isViewRecord(v: unknown): v is ViewRecord | ||
export declare function validateViewRecord(v: unknown): ValidationResult | ||
export declare function isViewRecord(v: unknown): v is ViewRecord; | ||
export declare function validateViewRecord(v: unknown): ValidationResult; | ||
export interface ViewNotFound { | ||
uri: string | ||
[k: string]: unknown | ||
uri: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isViewNotFound(v: unknown): v is ViewNotFound | ||
export declare function validateViewNotFound(v: unknown): ValidationResult | ||
export declare function isViewNotFound(v: unknown): v is ViewNotFound; | ||
export declare function validateViewNotFound(v: unknown): ValidationResult; | ||
export interface ViewBlocked { | ||
uri: string | ||
[k: string]: unknown | ||
uri: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isViewBlocked(v: unknown): v is ViewBlocked | ||
export declare function validateViewBlocked(v: unknown): ValidationResult | ||
export declare function isViewBlocked(v: unknown): v is ViewBlocked; | ||
export declare function validateViewBlocked(v: unknown): ValidationResult; |
@@ -1,30 +0,24 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import * as AppBskyEmbedRecord from './record' | ||
import * as AppBskyEmbedImages from './images' | ||
import * as AppBskyEmbedExternal from './external' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
import * as AppBskyEmbedRecord from './record'; | ||
import * as AppBskyEmbedImages from './images'; | ||
import * as AppBskyEmbedExternal from './external'; | ||
export interface Main { | ||
record: AppBskyEmbedRecord.Main | ||
media: | ||
| AppBskyEmbedImages.Main | ||
| AppBskyEmbedExternal.Main | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
record: AppBskyEmbedRecord.Main; | ||
media: AppBskyEmbedImages.Main | AppBskyEmbedExternal.Main | { | ||
$type: string; | ||
[k: string]: unknown; | ||
}; | ||
[k: string]: unknown; | ||
} | ||
export declare function isMain(v: unknown): v is Main | ||
export declare function validateMain(v: unknown): ValidationResult | ||
export declare function isMain(v: unknown): v is Main; | ||
export declare function validateMain(v: unknown): ValidationResult; | ||
export interface View { | ||
record: AppBskyEmbedRecord.View | ||
media: | ||
| AppBskyEmbedImages.View | ||
| AppBskyEmbedExternal.View | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
record: AppBskyEmbedRecord.View; | ||
media: AppBskyEmbedImages.View | AppBskyEmbedExternal.View | { | ||
$type: string; | ||
[k: string]: unknown; | ||
}; | ||
[k: string]: unknown; | ||
} | ||
export declare function isView(v: unknown): v is View | ||
export declare function validateView(v: unknown): ValidationResult | ||
export declare function isView(v: unknown): v is View; | ||
export declare function validateView(v: unknown): ValidationResult; |
@@ -1,165 +0,139 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import * as AppBskyActorDefs from '../actor/defs' | ||
import * as AppBskyEmbedImages from '../embed/images' | ||
import * as AppBskyEmbedExternal from '../embed/external' | ||
import * as AppBskyEmbedRecord from '../embed/record' | ||
import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia' | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' | ||
import * as AppBskyRichtextFacet from '../richtext/facet' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
import * as AppBskyActorDefs from '../actor/defs'; | ||
import * as AppBskyEmbedImages from '../embed/images'; | ||
import * as AppBskyEmbedExternal from '../embed/external'; | ||
import * as AppBskyEmbedRecord from '../embed/record'; | ||
import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia'; | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'; | ||
import * as AppBskyRichtextFacet from '../richtext/facet'; | ||
export interface PostView { | ||
uri: string | ||
cid: string | ||
author: AppBskyActorDefs.ProfileViewBasic | ||
record: {} | ||
embed?: | ||
| AppBskyEmbedImages.View | ||
| AppBskyEmbedExternal.View | ||
| AppBskyEmbedRecord.View | ||
| AppBskyEmbedRecordWithMedia.View | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
replyCount?: number | ||
repostCount?: number | ||
likeCount?: number | ||
indexedAt: string | ||
viewer?: ViewerState | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
[k: string]: unknown | ||
uri: string; | ||
cid: string; | ||
author: AppBskyActorDefs.ProfileViewBasic; | ||
record: {}; | ||
embed?: AppBskyEmbedImages.View | AppBskyEmbedExternal.View | AppBskyEmbedRecord.View | AppBskyEmbedRecordWithMedia.View | { | ||
$type: string; | ||
[k: string]: unknown; | ||
}; | ||
replyCount?: number; | ||
repostCount?: number; | ||
likeCount?: number; | ||
indexedAt: string; | ||
viewer?: ViewerState; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isPostView(v: unknown): v is PostView | ||
export declare function validatePostView(v: unknown): ValidationResult | ||
export declare function isPostView(v: unknown): v is PostView; | ||
export declare function validatePostView(v: unknown): ValidationResult; | ||
export interface ViewerState { | ||
repost?: string | ||
like?: string | ||
[k: string]: unknown | ||
repost?: string; | ||
like?: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isViewerState(v: unknown): v is ViewerState | ||
export declare function validateViewerState(v: unknown): ValidationResult | ||
export declare function isViewerState(v: unknown): v is ViewerState; | ||
export declare function validateViewerState(v: unknown): ValidationResult; | ||
export interface FeedViewPost { | ||
post: PostView | ||
reply?: ReplyRef | ||
reason?: | ||
| ReasonRepost | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
post: PostView; | ||
reply?: ReplyRef; | ||
reason?: ReasonRepost | { | ||
$type: string; | ||
[k: string]: unknown; | ||
}; | ||
[k: string]: unknown; | ||
} | ||
export declare function isFeedViewPost(v: unknown): v is FeedViewPost | ||
export declare function validateFeedViewPost(v: unknown): ValidationResult | ||
export declare function isFeedViewPost(v: unknown): v is FeedViewPost; | ||
export declare function validateFeedViewPost(v: unknown): ValidationResult; | ||
export interface ReplyRef { | ||
root: | ||
| PostView | ||
| NotFoundPost | ||
| BlockedPost | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
parent: | ||
| PostView | ||
| NotFoundPost | ||
| BlockedPost | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
root: PostView | NotFoundPost | BlockedPost | { | ||
$type: string; | ||
[k: string]: unknown; | ||
}; | ||
parent: PostView | NotFoundPost | BlockedPost | { | ||
$type: string; | ||
[k: string]: unknown; | ||
}; | ||
[k: string]: unknown; | ||
} | ||
export declare function isReplyRef(v: unknown): v is ReplyRef | ||
export declare function validateReplyRef(v: unknown): ValidationResult | ||
export declare function isReplyRef(v: unknown): v is ReplyRef; | ||
export declare function validateReplyRef(v: unknown): ValidationResult; | ||
export interface ReasonRepost { | ||
by: AppBskyActorDefs.ProfileViewBasic | ||
indexedAt: string | ||
[k: string]: unknown | ||
by: AppBskyActorDefs.ProfileViewBasic; | ||
indexedAt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isReasonRepost(v: unknown): v is ReasonRepost | ||
export declare function validateReasonRepost(v: unknown): ValidationResult | ||
export declare function isReasonRepost(v: unknown): v is ReasonRepost; | ||
export declare function validateReasonRepost(v: unknown): ValidationResult; | ||
export interface ThreadViewPost { | ||
post: PostView | ||
parent?: | ||
| ThreadViewPost | ||
| NotFoundPost | ||
| BlockedPost | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
replies?: ( | ||
| ThreadViewPost | ||
| NotFoundPost | ||
| BlockedPost | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
)[] | ||
[k: string]: unknown | ||
post: PostView; | ||
parent?: ThreadViewPost | NotFoundPost | BlockedPost | { | ||
$type: string; | ||
[k: string]: unknown; | ||
}; | ||
replies?: (ThreadViewPost | NotFoundPost | BlockedPost | { | ||
$type: string; | ||
[k: string]: unknown; | ||
})[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isThreadViewPost(v: unknown): v is ThreadViewPost | ||
export declare function validateThreadViewPost(v: unknown): ValidationResult | ||
export declare function isThreadViewPost(v: unknown): v is ThreadViewPost; | ||
export declare function validateThreadViewPost(v: unknown): ValidationResult; | ||
export interface NotFoundPost { | ||
uri: string | ||
notFound: true | ||
[k: string]: unknown | ||
uri: string; | ||
notFound: true; | ||
[k: string]: unknown; | ||
} | ||
export declare function isNotFoundPost(v: unknown): v is NotFoundPost | ||
export declare function validateNotFoundPost(v: unknown): ValidationResult | ||
export declare function isNotFoundPost(v: unknown): v is NotFoundPost; | ||
export declare function validateNotFoundPost(v: unknown): ValidationResult; | ||
export interface BlockedPost { | ||
uri: string | ||
blocked: true | ||
[k: string]: unknown | ||
uri: string; | ||
blocked: true; | ||
author: BlockedAuthor; | ||
[k: string]: unknown; | ||
} | ||
export declare function isBlockedPost(v: unknown): v is BlockedPost | ||
export declare function validateBlockedPost(v: unknown): ValidationResult | ||
export declare function isBlockedPost(v: unknown): v is BlockedPost; | ||
export declare function validateBlockedPost(v: unknown): ValidationResult; | ||
export interface BlockedAuthor { | ||
did: string; | ||
viewer?: AppBskyActorDefs.ViewerState; | ||
[k: string]: unknown; | ||
} | ||
export declare function isBlockedAuthor(v: unknown): v is BlockedAuthor; | ||
export declare function validateBlockedAuthor(v: unknown): ValidationResult; | ||
export interface GeneratorView { | ||
uri: string | ||
cid: string | ||
did: string | ||
creator: AppBskyActorDefs.ProfileView | ||
displayName: string | ||
description?: string | ||
descriptionFacets?: AppBskyRichtextFacet.Main[] | ||
avatar?: string | ||
likeCount?: number | ||
viewer?: GeneratorViewerState | ||
indexedAt: string | ||
[k: string]: unknown | ||
uri: string; | ||
cid: string; | ||
did: string; | ||
creator: AppBskyActorDefs.ProfileView; | ||
displayName: string; | ||
description?: string; | ||
descriptionFacets?: AppBskyRichtextFacet.Main[]; | ||
avatar?: string; | ||
likeCount?: number; | ||
viewer?: GeneratorViewerState; | ||
indexedAt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isGeneratorView(v: unknown): v is GeneratorView | ||
export declare function validateGeneratorView(v: unknown): ValidationResult | ||
export declare function isGeneratorView(v: unknown): v is GeneratorView; | ||
export declare function validateGeneratorView(v: unknown): ValidationResult; | ||
export interface GeneratorViewerState { | ||
like?: string | ||
[k: string]: unknown | ||
like?: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isGeneratorViewerState( | ||
v: unknown, | ||
): v is GeneratorViewerState | ||
export declare function validateGeneratorViewerState( | ||
v: unknown, | ||
): ValidationResult | ||
export declare function isGeneratorViewerState(v: unknown): v is GeneratorViewerState; | ||
export declare function validateGeneratorViewerState(v: unknown): ValidationResult; | ||
export interface SkeletonFeedPost { | ||
post: string | ||
reason?: | ||
| SkeletonReasonRepost | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
post: string; | ||
reason?: SkeletonReasonRepost | { | ||
$type: string; | ||
[k: string]: unknown; | ||
}; | ||
[k: string]: unknown; | ||
} | ||
export declare function isSkeletonFeedPost(v: unknown): v is SkeletonFeedPost | ||
export declare function validateSkeletonFeedPost(v: unknown): ValidationResult | ||
export declare function isSkeletonFeedPost(v: unknown): v is SkeletonFeedPost; | ||
export declare function validateSkeletonFeedPost(v: unknown): ValidationResult; | ||
export interface SkeletonReasonRepost { | ||
repost: string | ||
[k: string]: unknown | ||
repost: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isSkeletonReasonRepost( | ||
v: unknown, | ||
): v is SkeletonReasonRepost | ||
export declare function validateSkeletonReasonRepost( | ||
v: unknown, | ||
): ValidationResult | ||
export declare function isSkeletonReasonRepost(v: unknown): v is SkeletonReasonRepost; | ||
export declare function validateSkeletonReasonRepost(v: unknown): ValidationResult; |
@@ -1,9 +0,9 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'; | ||
export interface Record { | ||
subject: ComAtprotoRepoStrongRef.Main | ||
createdAt: string | ||
[k: string]: unknown | ||
subject: ComAtprotoRepoStrongRef.Main; | ||
createdAt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isRecord(v: unknown): v is Record | ||
export declare function validateRecord(v: unknown): ValidationResult | ||
export declare function isRecord(v: unknown): v is Record; | ||
export declare function validateRecord(v: unknown): ValidationResult; |
@@ -1,9 +0,9 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'; | ||
export interface Record { | ||
subject: ComAtprotoRepoStrongRef.Main | ||
createdAt: string | ||
[k: string]: unknown | ||
subject: ComAtprotoRepoStrongRef.Main; | ||
createdAt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isRecord(v: unknown): v is Record | ||
export declare function validateRecord(v: unknown): ValidationResult | ||
export declare function isRecord(v: unknown): v is Record; | ||
export declare function validateRecord(v: unknown): ValidationResult; |
@@ -1,8 +0,8 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
export interface Record { | ||
subject: string | ||
createdAt: string | ||
[k: string]: unknown | ||
subject: string; | ||
createdAt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isRecord(v: unknown): v is Record | ||
export declare function validateRecord(v: unknown): ValidationResult | ||
export declare function isRecord(v: unknown): v is Record; | ||
export declare function validateRecord(v: unknown): ValidationResult; |
@@ -1,44 +0,44 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import * as AppBskyActorDefs from '../actor/defs' | ||
import * as AppBskyRichtextFacet from '../richtext/facet' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
import * as AppBskyActorDefs from '../actor/defs'; | ||
import * as AppBskyRichtextFacet from '../richtext/facet'; | ||
export interface ListViewBasic { | ||
uri: string | ||
cid: string | ||
name: string | ||
purpose: ListPurpose | ||
avatar?: string | ||
viewer?: ListViewerState | ||
indexedAt?: string | ||
[k: string]: unknown | ||
uri: string; | ||
cid: string; | ||
name: string; | ||
purpose: ListPurpose; | ||
avatar?: string; | ||
viewer?: ListViewerState; | ||
indexedAt?: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isListViewBasic(v: unknown): v is ListViewBasic | ||
export declare function validateListViewBasic(v: unknown): ValidationResult | ||
export declare function isListViewBasic(v: unknown): v is ListViewBasic; | ||
export declare function validateListViewBasic(v: unknown): ValidationResult; | ||
export interface ListView { | ||
uri: string | ||
cid: string | ||
creator: AppBskyActorDefs.ProfileView | ||
name: string | ||
purpose: ListPurpose | ||
description?: string | ||
descriptionFacets?: AppBskyRichtextFacet.Main[] | ||
avatar?: string | ||
viewer?: ListViewerState | ||
indexedAt: string | ||
[k: string]: unknown | ||
uri: string; | ||
cid: string; | ||
creator: AppBskyActorDefs.ProfileView; | ||
name: string; | ||
purpose: ListPurpose; | ||
description?: string; | ||
descriptionFacets?: AppBskyRichtextFacet.Main[]; | ||
avatar?: string; | ||
viewer?: ListViewerState; | ||
indexedAt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isListView(v: unknown): v is ListView | ||
export declare function validateListView(v: unknown): ValidationResult | ||
export declare function isListView(v: unknown): v is ListView; | ||
export declare function validateListView(v: unknown): ValidationResult; | ||
export interface ListItemView { | ||
subject: AppBskyActorDefs.ProfileView | ||
[k: string]: unknown | ||
subject: AppBskyActorDefs.ProfileView; | ||
[k: string]: unknown; | ||
} | ||
export declare function isListItemView(v: unknown): v is ListItemView | ||
export declare function validateListItemView(v: unknown): ValidationResult | ||
export declare type ListPurpose = 'app.bsky.graph.defs#modlist' | (string & {}) | ||
export declare const MODLIST = 'app.bsky.graph.defs#modlist' | ||
export declare function isListItemView(v: unknown): v is ListItemView; | ||
export declare function validateListItemView(v: unknown): ValidationResult; | ||
export declare type ListPurpose = 'app.bsky.graph.defs#modlist' | (string & {}); | ||
export declare const MODLIST = "app.bsky.graph.defs#modlist"; | ||
export interface ListViewerState { | ||
muted?: boolean | ||
[k: string]: unknown | ||
muted?: boolean; | ||
[k: string]: unknown; | ||
} | ||
export declare function isListViewerState(v: unknown): v is ListViewerState | ||
export declare function validateListViewerState(v: unknown): ValidationResult | ||
export declare function isListViewerState(v: unknown): v is ListViewerState; | ||
export declare function validateListViewerState(v: unknown): ValidationResult; |
@@ -1,8 +0,8 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
export interface Record { | ||
subject: string | ||
createdAt: string | ||
[k: string]: unknown | ||
subject: string; | ||
createdAt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isRecord(v: unknown): v is Record | ||
export declare function validateRecord(v: unknown): ValidationResult | ||
export declare function isRecord(v: unknown): v is Record; | ||
export declare function validateRecord(v: unknown): ValidationResult; |
@@ -1,9 +0,9 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
export interface Record { | ||
subject: string | ||
list: string | ||
createdAt: string | ||
[k: string]: unknown | ||
subject: string; | ||
list: string; | ||
createdAt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isRecord(v: unknown): v is Record | ||
export declare function validateRecord(v: unknown): ValidationResult | ||
export declare function isRecord(v: unknown): v is Record; | ||
export declare function validateRecord(v: unknown): ValidationResult; |
@@ -1,34 +0,30 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
export interface Main { | ||
index: ByteSlice | ||
features: ( | ||
| Mention | ||
| Link | ||
| { | ||
$type: string | ||
[k: string]: unknown | ||
} | ||
)[] | ||
[k: string]: unknown | ||
index: ByteSlice; | ||
features: (Mention | Link | { | ||
$type: string; | ||
[k: string]: unknown; | ||
})[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isMain(v: unknown): v is Main | ||
export declare function validateMain(v: unknown): ValidationResult | ||
export declare function isMain(v: unknown): v is Main; | ||
export declare function validateMain(v: unknown): ValidationResult; | ||
export interface Mention { | ||
did: string | ||
[k: string]: unknown | ||
did: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isMention(v: unknown): v is Mention | ||
export declare function validateMention(v: unknown): ValidationResult | ||
export declare function isMention(v: unknown): v is Mention; | ||
export declare function validateMention(v: unknown): ValidationResult; | ||
export interface Link { | ||
uri: string | ||
[k: string]: unknown | ||
uri: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isLink(v: unknown): v is Link | ||
export declare function validateLink(v: unknown): ValidationResult | ||
export declare function isLink(v: unknown): v is Link; | ||
export declare function validateLink(v: unknown): ValidationResult; | ||
export interface ByteSlice { | ||
byteStart: number | ||
byteEnd: number | ||
[k: string]: unknown | ||
byteStart: number; | ||
byteEnd: number; | ||
[k: string]: unknown; | ||
} | ||
export declare function isByteSlice(v: unknown): v is ByteSlice | ||
export declare function validateByteSlice(v: unknown): ValidationResult | ||
export declare function isByteSlice(v: unknown): v is ByteSlice; | ||
export declare function validateByteSlice(v: unknown): ValidationResult; |
@@ -1,16 +0,16 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import * as ComAtprotoLabelDefs from './defs' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
import * as ComAtprotoLabelDefs from './defs'; | ||
export interface Labels { | ||
seq: number | ||
labels: ComAtprotoLabelDefs.Label[] | ||
[k: string]: unknown | ||
seq: number; | ||
labels: ComAtprotoLabelDefs.Label[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isLabels(v: unknown): v is Labels | ||
export declare function validateLabels(v: unknown): ValidationResult | ||
export declare function isLabels(v: unknown): v is Labels; | ||
export declare function validateLabels(v: unknown): ValidationResult; | ||
export interface Info { | ||
name: 'OutdatedCursor' | (string & {}) | ||
message?: string | ||
[k: string]: unknown | ||
name: 'OutdatedCursor' | (string & {}); | ||
message?: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isInfo(v: unknown): v is Info | ||
export declare function validateInfo(v: unknown): ValidationResult | ||
export declare function isInfo(v: unknown): v is Info; | ||
export declare function validateInfo(v: unknown): ValidationResult; |
@@ -1,16 +0,7 @@ | ||
export declare type ReasonType = | ||
| 'com.atproto.moderation.defs#reasonSpam' | ||
| 'com.atproto.moderation.defs#reasonViolation' | ||
| 'com.atproto.moderation.defs#reasonMisleading' | ||
| 'com.atproto.moderation.defs#reasonSexual' | ||
| 'com.atproto.moderation.defs#reasonRude' | ||
| 'com.atproto.moderation.defs#reasonOther' | ||
| (string & {}) | ||
export declare const REASONSPAM = 'com.atproto.moderation.defs#reasonSpam' | ||
export declare const REASONVIOLATION = | ||
'com.atproto.moderation.defs#reasonViolation' | ||
export declare const REASONMISLEADING = | ||
'com.atproto.moderation.defs#reasonMisleading' | ||
export declare const REASONSEXUAL = 'com.atproto.moderation.defs#reasonSexual' | ||
export declare const REASONRUDE = 'com.atproto.moderation.defs#reasonRude' | ||
export declare const REASONOTHER = 'com.atproto.moderation.defs#reasonOther' | ||
export declare type ReasonType = 'com.atproto.moderation.defs#reasonSpam' | 'com.atproto.moderation.defs#reasonViolation' | 'com.atproto.moderation.defs#reasonMisleading' | 'com.atproto.moderation.defs#reasonSexual' | 'com.atproto.moderation.defs#reasonRude' | 'com.atproto.moderation.defs#reasonOther' | (string & {}); | ||
export declare const REASONSPAM = "com.atproto.moderation.defs#reasonSpam"; | ||
export declare const REASONVIOLATION = "com.atproto.moderation.defs#reasonViolation"; | ||
export declare const REASONMISLEADING = "com.atproto.moderation.defs#reasonMisleading"; | ||
export declare const REASONSEXUAL = "com.atproto.moderation.defs#reasonSexual"; | ||
export declare const REASONRUDE = "com.atproto.moderation.defs#reasonRude"; | ||
export declare const REASONOTHER = "com.atproto.moderation.defs#reasonOther"; |
@@ -1,8 +0,8 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
export interface Main { | ||
uri: string | ||
cid: string | ||
[k: string]: unknown | ||
uri: string; | ||
cid: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isMain(v: unknown): v is Main | ||
export declare function validateMain(v: unknown): ValidationResult | ||
export declare function isMain(v: unknown): v is Main; | ||
export declare function validateMain(v: unknown): ValidationResult; |
@@ -1,20 +0,20 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
export interface InviteCode { | ||
code: string | ||
available: number | ||
disabled: boolean | ||
forAccount: string | ||
createdBy: string | ||
createdAt: string | ||
uses: InviteCodeUse[] | ||
[k: string]: unknown | ||
code: string; | ||
available: number; | ||
disabled: boolean; | ||
forAccount: string; | ||
createdBy: string; | ||
createdAt: string; | ||
uses: InviteCodeUse[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isInviteCode(v: unknown): v is InviteCode | ||
export declare function validateInviteCode(v: unknown): ValidationResult | ||
export declare function isInviteCode(v: unknown): v is InviteCode; | ||
export declare function validateInviteCode(v: unknown): ValidationResult; | ||
export interface InviteCodeUse { | ||
usedBy: string | ||
usedAt: string | ||
[k: string]: unknown | ||
usedBy: string; | ||
usedAt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isInviteCodeUse(v: unknown): v is InviteCodeUse | ||
export declare function validateInviteCodeUse(v: unknown): ValidationResult | ||
export declare function isInviteCodeUse(v: unknown): v is InviteCodeUse; | ||
export declare function validateInviteCodeUse(v: unknown): ValidationResult; |
@@ -1,58 +0,58 @@ | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import { CID } from 'multiformats/cid' | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
import { CID } from 'multiformats/cid'; | ||
export interface Commit { | ||
seq: number | ||
rebase: boolean | ||
tooBig: boolean | ||
repo: string | ||
commit: CID | ||
prev: CID | null | ||
blocks: Uint8Array | ||
ops: RepoOp[] | ||
blobs: CID[] | ||
time: string | ||
[k: string]: unknown | ||
seq: number; | ||
rebase: boolean; | ||
tooBig: boolean; | ||
repo: string; | ||
commit: CID; | ||
prev: CID | null; | ||
blocks: Uint8Array; | ||
ops: RepoOp[]; | ||
blobs: CID[]; | ||
time: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isCommit(v: unknown): v is Commit | ||
export declare function validateCommit(v: unknown): ValidationResult | ||
export declare function isCommit(v: unknown): v is Commit; | ||
export declare function validateCommit(v: unknown): ValidationResult; | ||
export interface Handle { | ||
seq: number | ||
did: string | ||
handle: string | ||
time: string | ||
[k: string]: unknown | ||
seq: number; | ||
did: string; | ||
handle: string; | ||
time: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isHandle(v: unknown): v is Handle | ||
export declare function validateHandle(v: unknown): ValidationResult | ||
export declare function isHandle(v: unknown): v is Handle; | ||
export declare function validateHandle(v: unknown): ValidationResult; | ||
export interface Migrate { | ||
seq: number | ||
did: string | ||
migrateTo: string | null | ||
time: string | ||
[k: string]: unknown | ||
seq: number; | ||
did: string; | ||
migrateTo: string | null; | ||
time: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isMigrate(v: unknown): v is Migrate | ||
export declare function validateMigrate(v: unknown): ValidationResult | ||
export declare function isMigrate(v: unknown): v is Migrate; | ||
export declare function validateMigrate(v: unknown): ValidationResult; | ||
export interface Tombstone { | ||
seq: number | ||
did: string | ||
time: string | ||
[k: string]: unknown | ||
seq: number; | ||
did: string; | ||
time: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isTombstone(v: unknown): v is Tombstone | ||
export declare function validateTombstone(v: unknown): ValidationResult | ||
export declare function isTombstone(v: unknown): v is Tombstone; | ||
export declare function validateTombstone(v: unknown): ValidationResult; | ||
export interface Info { | ||
name: 'OutdatedCursor' | (string & {}) | ||
message?: string | ||
[k: string]: unknown | ||
name: 'OutdatedCursor' | (string & {}); | ||
message?: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isInfo(v: unknown): v is Info | ||
export declare function validateInfo(v: unknown): ValidationResult | ||
export declare function isInfo(v: unknown): v is Info; | ||
export declare function validateInfo(v: unknown): ValidationResult; | ||
export interface RepoOp { | ||
action: 'create' | 'update' | 'delete' | (string & {}) | ||
path: string | ||
cid: CID | null | ||
[k: string]: unknown | ||
action: 'create' | 'update' | 'delete' | (string & {}); | ||
path: string; | ||
cid: CID | null; | ||
[k: string]: unknown; | ||
} | ||
export declare function isRepoOp(v: unknown): v is RepoOp | ||
export declare function validateRepoOp(v: unknown): ValidationResult | ||
export declare function isRepoOp(v: unknown): v is RepoOp; | ||
export declare function validateRepoOp(v: unknown): ValidationResult; |
@@ -1,5 +0,2 @@ | ||
export declare function isObj(v: unknown): v is Record<string, unknown> | ||
export declare function hasProp<K extends PropertyKey>( | ||
data: object, | ||
prop: K, | ||
): data is Record<K, unknown> | ||
export declare function isObj(v: unknown): v is Record<string, unknown>; | ||
export declare function hasProp<K extends PropertyKey>(data: object, prop: K): data is Record<K, unknown>; |
@@ -1,4 +0,4 @@ | ||
import { AppBskyRichtextFacet } from '../client' | ||
import { UnicodeString } from './unicode' | ||
export declare type Facet = AppBskyRichtextFacet.Main | ||
export declare function detectFacets(text: UnicodeString): Facet[] | undefined | ||
import { AppBskyRichtextFacet } from '../client'; | ||
import { UnicodeString } from './unicode'; | ||
export declare type Facet = AppBskyRichtextFacet.Main; | ||
export declare function detectFacets(text: UnicodeString): Facet[] | undefined; |
@@ -1,39 +0,39 @@ | ||
import { AtpAgent } from '../agent' | ||
import { AppBskyFeedPost, AppBskyRichtextFacet } from '../client' | ||
import { UnicodeString } from './unicode' | ||
export declare type Facet = AppBskyRichtextFacet.Main | ||
export declare type FacetLink = AppBskyRichtextFacet.Link | ||
export declare type FacetMention = AppBskyRichtextFacet.Mention | ||
export declare type Entity = AppBskyFeedPost.Entity | ||
import { AtpAgent } from '../agent'; | ||
import { AppBskyFeedPost, AppBskyRichtextFacet } from '../client'; | ||
import { UnicodeString } from './unicode'; | ||
export declare type Facet = AppBskyRichtextFacet.Main; | ||
export declare type FacetLink = AppBskyRichtextFacet.Link; | ||
export declare type FacetMention = AppBskyRichtextFacet.Mention; | ||
export declare type Entity = AppBskyFeedPost.Entity; | ||
export interface RichTextProps { | ||
text: string | ||
facets?: Facet[] | ||
entities?: Entity[] | ||
text: string; | ||
facets?: Facet[]; | ||
entities?: Entity[]; | ||
} | ||
export interface RichTextOpts { | ||
cleanNewlines?: boolean | ||
cleanNewlines?: boolean; | ||
} | ||
export declare class RichTextSegment { | ||
text: string | ||
facet?: AppBskyRichtextFacet.Main | undefined | ||
constructor(text: string, facet?: AppBskyRichtextFacet.Main | undefined) | ||
get link(): FacetLink | undefined | ||
isLink(): boolean | ||
get mention(): FacetMention | undefined | ||
isMention(): boolean | ||
text: string; | ||
facet?: AppBskyRichtextFacet.Main | undefined; | ||
constructor(text: string, facet?: AppBskyRichtextFacet.Main | undefined); | ||
get link(): FacetLink | undefined; | ||
isLink(): boolean; | ||
get mention(): FacetMention | undefined; | ||
isMention(): boolean; | ||
} | ||
export declare class RichText { | ||
unicodeText: UnicodeString | ||
facets?: Facet[] | ||
constructor(props: RichTextProps, opts?: RichTextOpts) | ||
get text(): string | ||
get length(): number | ||
get graphemeLength(): number | ||
clone(): RichText | ||
copyInto(target: RichText): void | ||
segments(): Generator<RichTextSegment, void, void> | ||
insert(insertIndex: number, insertText: string): this | ||
delete(removeStartIndex: number, removeEndIndex: number): this | ||
detectFacets(agent: AtpAgent): Promise<void> | ||
detectFacetsWithoutResolution(): void | ||
unicodeText: UnicodeString; | ||
facets?: Facet[]; | ||
constructor(props: RichTextProps, opts?: RichTextOpts); | ||
get text(): string; | ||
get length(): number; | ||
get graphemeLength(): number; | ||
clone(): RichText; | ||
copyInto(target: RichText): void; | ||
segments(): Generator<RichTextSegment, void, void>; | ||
insert(insertIndex: number, insertText: string): this; | ||
delete(removeStartIndex: number, removeEndIndex: number): this; | ||
detectFacets(agent: AtpAgent): Promise<void>; | ||
detectFacetsWithoutResolution(): void; | ||
} |
@@ -1,7 +0,4 @@ | ||
import { RichText } from './rich-text' | ||
export declare function sanitizeRichText( | ||
richText: RichText, | ||
opts: { | ||
cleanNewlines?: boolean | ||
}, | ||
): RichText | ||
import { RichText } from './rich-text'; | ||
export declare function sanitizeRichText(richText: RichText, opts: { | ||
cleanNewlines?: boolean; | ||
}): RichText; |
export declare class UnicodeString { | ||
utf16: string | ||
utf8: Uint8Array | ||
private _graphemeLen? | ||
constructor(utf16: string) | ||
get length(): number | ||
get graphemeLength(): number | ||
slice(start?: number, end?: number): string | ||
utf16IndexToUtf8Index(i: number): number | ||
toString(): string | ||
utf16: string; | ||
utf8: Uint8Array; | ||
private _graphemeLen?; | ||
constructor(utf16: string); | ||
get length(): number; | ||
get graphemeLength(): number; | ||
slice(start?: number, end?: number): string; | ||
utf16IndexToUtf8Index(i: number): number; | ||
toString(): string; | ||
} |
@@ -1,46 +0,34 @@ | ||
export declare type AtpSessionEvent = | ||
| 'create' | ||
| 'create-failed' | ||
| 'update' | ||
| 'expired' | ||
export declare type AtpSessionEvent = 'create' | 'create-failed' | 'update' | 'expired'; | ||
export interface AtpSessionData { | ||
refreshJwt: string | ||
accessJwt: string | ||
handle: string | ||
did: string | ||
email?: string | ||
refreshJwt: string; | ||
accessJwt: string; | ||
handle: string; | ||
did: string; | ||
email?: string; | ||
} | ||
export declare type AtpPersistSessionHandler = ( | ||
evt: AtpSessionEvent, | ||
session: AtpSessionData | undefined, | ||
) => void | Promise<void> | ||
export declare type AtpPersistSessionHandler = (evt: AtpSessionEvent, session: AtpSessionData | undefined) => void | Promise<void>; | ||
export interface AtpAgentOpts { | ||
service: string | URL | ||
persistSession?: AtpPersistSessionHandler | ||
service: string | URL; | ||
persistSession?: AtpPersistSessionHandler; | ||
} | ||
export interface AtpAgentCreateAccountOpts { | ||
email: string | ||
password: string | ||
handle: string | ||
inviteCode?: string | ||
email: string; | ||
password: string; | ||
handle: string; | ||
inviteCode?: string; | ||
} | ||
export interface AtpAgentLoginOpts { | ||
identifier: string | ||
password: string | ||
identifier: string; | ||
password: string; | ||
} | ||
declare type AtpAgentFetchHeaders = Record<string, string> | ||
declare type AtpAgentFetchHeaders = Record<string, string>; | ||
export interface AtpAgentFetchHandlerResponse { | ||
status: number | ||
headers: Record<string, string> | ||
body: any | ||
status: number; | ||
headers: Record<string, string>; | ||
body: any; | ||
} | ||
export declare type AtpAgentFetchHandler = ( | ||
httpUri: string, | ||
httpMethod: string, | ||
httpHeaders: AtpAgentFetchHeaders, | ||
httpReqBody: any, | ||
) => Promise<AtpAgentFetchHandlerResponse> | ||
export declare type AtpAgentFetchHandler = (httpUri: string, httpMethod: string, httpHeaders: AtpAgentFetchHeaders, httpReqBody: any) => Promise<AtpAgentFetchHandlerResponse>; | ||
export interface AtpAgentGlobalOpts { | ||
fetch: AtpAgentFetchHandler | ||
fetch: AtpAgentFetchHandler; | ||
} | ||
export {} | ||
export {}; |
{ | ||
"name": "@atproto/api", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -174,2 +174,3 @@ /** | ||
blocked: true | ||
author: BlockedAuthor | ||
[k: string]: unknown | ||
@@ -190,2 +191,20 @@ } | ||
export interface BlockedAuthor { | ||
did: string | ||
viewer?: AppBskyActorDefs.ViewerState | ||
[k: string]: unknown | ||
} | ||
export function isBlockedAuthor(v: unknown): v is BlockedAuthor { | ||
return ( | ||
isObj(v) && | ||
hasProp(v, '$type') && | ||
v.$type === 'app.bsky.feed.defs#blockedAuthor' | ||
) | ||
} | ||
export function validateBlockedAuthor(v: unknown): ValidationResult { | ||
return lexicons.validate('app.bsky.feed.defs#blockedAuthor', v) | ||
} | ||
export interface GeneratorView { | ||
@@ -192,0 +211,0 @@ uri: string |
@@ -42,3 +42,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -49,3 +49,3 @@ } | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -52,0 +52,0 @@ } |
@@ -37,3 +37,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -40,0 +40,0 @@ } |
@@ -37,3 +37,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -40,0 +40,0 @@ } |
@@ -40,3 +40,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -43,0 +43,0 @@ } |
@@ -36,3 +36,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -39,0 +39,0 @@ } |
@@ -31,3 +31,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -34,0 +34,0 @@ } |
@@ -30,3 +30,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -33,0 +33,0 @@ } |
@@ -33,3 +33,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -40,3 +40,3 @@ } | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -43,0 +43,0 @@ } |
@@ -48,3 +48,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -51,0 +51,0 @@ } |
@@ -35,3 +35,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -38,0 +38,0 @@ } |
@@ -48,3 +48,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -51,0 +51,0 @@ } |
@@ -39,3 +39,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -42,0 +42,0 @@ } |
@@ -50,3 +50,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -53,0 +53,0 @@ } |
@@ -33,3 +33,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -40,3 +40,3 @@ } | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -43,0 +43,0 @@ } |
@@ -44,3 +44,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -51,3 +51,3 @@ } | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -58,3 +58,3 @@ } | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -65,3 +65,3 @@ } | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -72,3 +72,3 @@ } | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -79,3 +79,3 @@ } | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -86,3 +86,3 @@ } | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -89,0 +89,0 @@ } |
@@ -33,3 +33,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -36,0 +36,0 @@ } |
@@ -42,3 +42,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -45,0 +45,0 @@ } |
@@ -32,3 +32,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -39,3 +39,3 @@ } | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -42,0 +42,0 @@ } |
@@ -35,3 +35,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -38,0 +38,0 @@ } |
@@ -31,3 +31,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -34,0 +34,0 @@ } |
@@ -35,3 +35,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -38,0 +38,0 @@ } |
@@ -31,3 +31,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -38,3 +38,3 @@ } | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -41,0 +41,0 @@ } |
@@ -34,3 +34,3 @@ /** | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message) | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
@@ -37,0 +37,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4196294
395
63365