@atproto/api
Advanced tools
Comparing version 0.6.12 to 0.6.13
@@ -58,3 +58,2 @@ import { Client as XrpcClient, ServiceClient as XrpcServiceClient } from '@atproto/xrpc'; | ||
import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'; | ||
import * as ComAtprotoTempUpgradeRepoVersion from './types/com/atproto/temp/upgradeRepoVersion'; | ||
import * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences'; | ||
@@ -78,2 +77,3 @@ import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'; | ||
import * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes'; | ||
import * as AppBskyFeedGetListFeed from './types/app/bsky/feed/getListFeed'; | ||
import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread'; | ||
@@ -87,2 +87,3 @@ import * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts'; | ||
import * as AppBskyFeedRepost from './types/app/bsky/feed/repost'; | ||
import * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate'; | ||
import * as AppBskyGraphBlock from './types/app/bsky/graph/block'; | ||
@@ -94,6 +95,9 @@ import * as AppBskyGraphFollow from './types/app/bsky/graph/follow'; | ||
import * as AppBskyGraphGetList from './types/app/bsky/graph/getList'; | ||
import * as AppBskyGraphGetListBlocks from './types/app/bsky/graph/getListBlocks'; | ||
import * as AppBskyGraphGetListMutes from './types/app/bsky/graph/getListMutes'; | ||
import * as AppBskyGraphGetLists from './types/app/bsky/graph/getLists'; | ||
import * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes'; | ||
import * as AppBskyGraphGetSuggestedFollowsByActor from './types/app/bsky/graph/getSuggestedFollowsByActor'; | ||
import * as AppBskyGraphList from './types/app/bsky/graph/list'; | ||
import * as AppBskyGraphListblock from './types/app/bsky/graph/listblock'; | ||
import * as AppBskyGraphListitem from './types/app/bsky/graph/listitem'; | ||
@@ -175,3 +179,2 @@ import * as AppBskyGraphMuteActor from './types/app/bsky/graph/muteActor'; | ||
export * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'; | ||
export * as ComAtprotoTempUpgradeRepoVersion from './types/com/atproto/temp/upgradeRepoVersion'; | ||
export * as AppBskyActorDefs from './types/app/bsky/actor/defs'; | ||
@@ -201,2 +204,3 @@ export * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences'; | ||
export * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes'; | ||
export * as AppBskyFeedGetListFeed from './types/app/bsky/feed/getListFeed'; | ||
export * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread'; | ||
@@ -210,2 +214,3 @@ export * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts'; | ||
export * as AppBskyFeedRepost from './types/app/bsky/feed/repost'; | ||
export * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate'; | ||
export * as AppBskyGraphBlock from './types/app/bsky/graph/block'; | ||
@@ -218,6 +223,9 @@ export * as AppBskyGraphDefs from './types/app/bsky/graph/defs'; | ||
export * as AppBskyGraphGetList from './types/app/bsky/graph/getList'; | ||
export * as AppBskyGraphGetListBlocks from './types/app/bsky/graph/getListBlocks'; | ||
export * as AppBskyGraphGetListMutes from './types/app/bsky/graph/getListMutes'; | ||
export * as AppBskyGraphGetLists from './types/app/bsky/graph/getLists'; | ||
export * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes'; | ||
export * as AppBskyGraphGetSuggestedFollowsByActor from './types/app/bsky/graph/getSuggestedFollowsByActor'; | ||
export * as AppBskyGraphList from './types/app/bsky/graph/list'; | ||
export * as AppBskyGraphListblock from './types/app/bsky/graph/listblock'; | ||
export * as AppBskyGraphListitem from './types/app/bsky/graph/listitem'; | ||
@@ -253,2 +261,3 @@ export * as AppBskyGraphMuteActor from './types/app/bsky/graph/muteActor'; | ||
DefsModlist: string; | ||
DefsCuratelist: string; | ||
}; | ||
@@ -282,3 +291,2 @@ export declare class AtpBaseClient { | ||
sync: SyncNS; | ||
temp: TempNS; | ||
constructor(service: AtpServiceClient); | ||
@@ -370,7 +378,2 @@ } | ||
} | ||
export declare class TempNS { | ||
_service: AtpServiceClient; | ||
constructor(service: AtpServiceClient); | ||
upgradeRepoVersion(data?: ComAtprotoTempUpgradeRepoVersion.InputSchema, opts?: ComAtprotoTempUpgradeRepoVersion.CallOptions): Promise<ComAtprotoTempUpgradeRepoVersion.Response>; | ||
} | ||
export declare class AppNS { | ||
@@ -435,2 +438,3 @@ _service: AtpServiceClient; | ||
repost: RepostRecord; | ||
threadgate: ThreadgateRecord; | ||
constructor(service: AtpServiceClient); | ||
@@ -446,2 +450,3 @@ describeFeedGenerator(params?: AppBskyFeedDescribeFeedGenerator.QueryParams, opts?: AppBskyFeedDescribeFeedGenerator.CallOptions): Promise<AppBskyFeedDescribeFeedGenerator.Response>; | ||
getLikes(params?: AppBskyFeedGetLikes.QueryParams, opts?: AppBskyFeedGetLikes.CallOptions): Promise<AppBskyFeedGetLikes.Response>; | ||
getListFeed(params?: AppBskyFeedGetListFeed.QueryParams, opts?: AppBskyFeedGetListFeed.CallOptions): Promise<AppBskyFeedGetListFeed.Response>; | ||
getPostThread(params?: AppBskyFeedGetPostThread.QueryParams, opts?: AppBskyFeedGetPostThread.CallOptions): Promise<AppBskyFeedGetPostThread.Response>; | ||
@@ -537,2 +542,23 @@ getPosts(params?: AppBskyFeedGetPosts.QueryParams, opts?: AppBskyFeedGetPosts.CallOptions): Promise<AppBskyFeedGetPosts.Response>; | ||
} | ||
export declare class ThreadgateRecord { | ||
_service: AtpServiceClient; | ||
constructor(service: AtpServiceClient); | ||
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>): Promise<{ | ||
cursor?: string; | ||
records: { | ||
uri: string; | ||
value: AppBskyFeedThreadgate.Record; | ||
}[]; | ||
}>; | ||
get(params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>): Promise<{ | ||
uri: string; | ||
cid: string; | ||
value: AppBskyFeedThreadgate.Record; | ||
}>; | ||
create(params: Omit<ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record'>, record: AppBskyFeedThreadgate.Record, headers?: Record<string, string>): Promise<{ | ||
uri: string; | ||
cid: string; | ||
}>; | ||
delete(params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>): Promise<void>; | ||
} | ||
export declare class GraphNS { | ||
@@ -543,2 +569,3 @@ _service: AtpServiceClient; | ||
list: ListRecord; | ||
listblock: ListblockRecord; | ||
listitem: ListitemRecord; | ||
@@ -550,5 +577,7 @@ constructor(service: AtpServiceClient); | ||
getList(params?: AppBskyGraphGetList.QueryParams, opts?: AppBskyGraphGetList.CallOptions): Promise<AppBskyGraphGetList.Response>; | ||
getListBlocks(params?: AppBskyGraphGetListBlocks.QueryParams, opts?: AppBskyGraphGetListBlocks.CallOptions): Promise<AppBskyGraphGetListBlocks.Response>; | ||
getListMutes(params?: AppBskyGraphGetListMutes.QueryParams, opts?: AppBskyGraphGetListMutes.CallOptions): Promise<AppBskyGraphGetListMutes.Response>; | ||
getLists(params?: AppBskyGraphGetLists.QueryParams, opts?: AppBskyGraphGetLists.CallOptions): Promise<AppBskyGraphGetLists.Response>; | ||
getMutes(params?: AppBskyGraphGetMutes.QueryParams, opts?: AppBskyGraphGetMutes.CallOptions): Promise<AppBskyGraphGetMutes.Response>; | ||
getSuggestedFollowsByActor(params?: AppBskyGraphGetSuggestedFollowsByActor.QueryParams, opts?: AppBskyGraphGetSuggestedFollowsByActor.CallOptions): Promise<AppBskyGraphGetSuggestedFollowsByActor.Response>; | ||
muteActor(data?: AppBskyGraphMuteActor.InputSchema, opts?: AppBskyGraphMuteActor.CallOptions): Promise<AppBskyGraphMuteActor.Response>; | ||
@@ -622,2 +651,23 @@ muteActorList(data?: AppBskyGraphMuteActorList.InputSchema, opts?: AppBskyGraphMuteActorList.CallOptions): Promise<AppBskyGraphMuteActorList.Response>; | ||
} | ||
export declare class ListblockRecord { | ||
_service: AtpServiceClient; | ||
constructor(service: AtpServiceClient); | ||
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>): Promise<{ | ||
cursor?: string; | ||
records: { | ||
uri: string; | ||
value: AppBskyGraphListblock.Record; | ||
}[]; | ||
}>; | ||
get(params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>): Promise<{ | ||
uri: string; | ||
cid: string; | ||
value: AppBskyGraphListblock.Record; | ||
}>; | ||
create(params: Omit<ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record'>, record: AppBskyGraphListblock.Record, headers?: Record<string, string>): Promise<{ | ||
uri: string; | ||
cid: string; | ||
}>; | ||
delete(params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>): Promise<void>; | ||
} | ||
export declare class ListitemRecord { | ||
@@ -624,0 +674,0 @@ _service: AtpServiceClient; |
@@ -9,2 +9,3 @@ import { ValidationResult } from '@atproto/lexicon'; | ||
import * as AppBskyRichtextFacet from '../richtext/facet'; | ||
import * as AppBskyGraphDefs from '../graph/defs'; | ||
export interface PostView { | ||
@@ -25,2 +26,3 @@ uri: string; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
threadgate?: ThreadgateView; | ||
[k: string]: unknown; | ||
@@ -78,2 +80,3 @@ } | ||
})[]; | ||
viewer?: ViewerThreadState; | ||
[k: string]: unknown; | ||
@@ -105,2 +108,8 @@ } | ||
export declare function validateBlockedAuthor(v: unknown): ValidationResult; | ||
export interface ViewerThreadState { | ||
canReply?: boolean; | ||
[k: string]: unknown; | ||
} | ||
export declare function isViewerThreadState(v: unknown): v is ViewerThreadState; | ||
export declare function validateViewerThreadState(v: unknown): ValidationResult; | ||
export interface GeneratorView { | ||
@@ -144,1 +153,10 @@ uri: string; | ||
export declare function validateSkeletonReasonRepost(v: unknown): ValidationResult; | ||
export interface ThreadgateView { | ||
uri?: string; | ||
cid?: string; | ||
record?: {}; | ||
lists?: AppBskyGraphDefs.ListViewBasic[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isThreadgateView(v: unknown): v is ThreadgateView; | ||
export declare function validateThreadgateView(v: unknown): ValidationResult; |
@@ -37,6 +37,8 @@ import { ValidationResult } from '@atproto/lexicon'; | ||
export declare function validateListItemView(v: unknown): ValidationResult; | ||
export declare type ListPurpose = 'app.bsky.graph.defs#modlist' | (string & {}); | ||
export declare type ListPurpose = 'app.bsky.graph.defs#modlist' | 'app.bsky.graph.defs#curatelist' | (string & {}); | ||
export declare const MODLIST = "app.bsky.graph.defs#modlist"; | ||
export declare const CURATELIST = "app.bsky.graph.defs#curatelist"; | ||
export interface ListViewerState { | ||
muted?: boolean; | ||
blocked?: string; | ||
[k: string]: unknown; | ||
@@ -43,0 +45,0 @@ } |
{ | ||
"name": "@atproto/api", | ||
"version": "0.6.12", | ||
"version": "0.6.13", | ||
"main": "dist/index.js", | ||
@@ -16,4 +16,4 @@ "license": "MIT", | ||
"@atproto/common-web": "^0.2.0", | ||
"@atproto/lexicon": "^0.2.0", | ||
"@atproto/syntax": "^0.1.0", | ||
"@atproto/lexicon": "^0.2.0", | ||
"@atproto/xrpc": "^0.3.0" | ||
@@ -23,4 +23,4 @@ }, | ||
"common-tags": "^1.8.2", | ||
"@atproto/pds": "^0.1.12", | ||
"@atproto/lex-cli": "^0.2.0" | ||
"@atproto/lex-cli": "^0.2.0", | ||
"@atproto/pds": "^0.1.13" | ||
}, | ||
@@ -27,0 +27,0 @@ "scripts": { |
@@ -15,2 +15,3 @@ /** | ||
import * as AppBskyRichtextFacet from '../richtext/facet' | ||
import * as AppBskyGraphDefs from '../graph/defs' | ||
@@ -34,2 +35,3 @@ export interface PostView { | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
threadgate?: ThreadgateView | ||
[k: string]: unknown | ||
@@ -140,2 +142,3 @@ } | ||
)[] | ||
viewer?: ViewerThreadState | ||
[k: string]: unknown | ||
@@ -211,2 +214,19 @@ } | ||
export interface ViewerThreadState { | ||
canReply?: boolean | ||
[k: string]: unknown | ||
} | ||
export function isViewerThreadState(v: unknown): v is ViewerThreadState { | ||
return ( | ||
isObj(v) && | ||
hasProp(v, '$type') && | ||
v.$type === 'app.bsky.feed.defs#viewerThreadState' | ||
) | ||
} | ||
export function validateViewerThreadState(v: unknown): ValidationResult { | ||
return lexicons.validate('app.bsky.feed.defs#viewerThreadState', v) | ||
} | ||
export interface GeneratorView { | ||
@@ -290,1 +310,21 @@ uri: string | ||
} | ||
export interface ThreadgateView { | ||
uri?: string | ||
cid?: string | ||
record?: {} | ||
lists?: AppBskyGraphDefs.ListViewBasic[] | ||
[k: string]: unknown | ||
} | ||
export function isThreadgateView(v: unknown): v is ThreadgateView { | ||
return ( | ||
isObj(v) && | ||
hasProp(v, '$type') && | ||
v.$type === 'app.bsky.feed.defs#threadgateView' | ||
) | ||
} | ||
export function validateThreadgateView(v: unknown): ValidationResult { | ||
return lexicons.validate('app.bsky.feed.defs#threadgateView', v) | ||
} |
@@ -77,9 +77,15 @@ /** | ||
export type ListPurpose = 'app.bsky.graph.defs#modlist' | (string & {}) | ||
export type ListPurpose = | ||
| 'app.bsky.graph.defs#modlist' | ||
| 'app.bsky.graph.defs#curatelist' | ||
| (string & {}) | ||
/** A list of actors to apply an aggregate moderation action (mute/block) on */ | ||
export const MODLIST = 'app.bsky.graph.defs#modlist' | ||
/** A list of actors used for curation purposes such as list feeds or interaction gating */ | ||
export const CURATELIST = 'app.bsky.graph.defs#curatelist' | ||
export interface ListViewerState { | ||
muted?: boolean | ||
blocked?: string | ||
[k: string]: unknown | ||
@@ -86,0 +92,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 too big to display
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
4210815
341
64747