@atproto/api
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -14,4 +14,6 @@ import { Client as XrpcClient, ServiceClient as XrpcServiceClient } from '@atproto/xrpc'; | ||
import * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction'; | ||
import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'; | ||
import * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle'; | ||
import * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle'; | ||
import * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels'; | ||
import * as ComAtprotoModerationCreateReport from './types/com/atproto/moderation/createReport'; | ||
@@ -28,2 +30,3 @@ import * as ComAtprotoRepoApplyWrites from './types/com/atproto/repo/applyWrites'; | ||
import * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode'; | ||
import * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes'; | ||
import * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession'; | ||
@@ -47,2 +50,3 @@ import * as ComAtprotoServerDeleteAccount from './types/com/atproto/server/deleteAccount'; | ||
import * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs'; | ||
import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos'; | ||
import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'; | ||
@@ -87,4 +91,8 @@ import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'; | ||
export * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction'; | ||
export * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'; | ||
export * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle'; | ||
export * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle'; | ||
export * as ComAtprotoLabelDefs from './types/com/atproto/label/defs'; | ||
export * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels'; | ||
export * as ComAtprotoLabelSubscribeLabels from './types/com/atproto/label/subscribeLabels'; | ||
export * as ComAtprotoModerationCreateReport from './types/com/atproto/moderation/createReport'; | ||
@@ -103,2 +111,3 @@ export * as ComAtprotoModerationDefs from './types/com/atproto/moderation/defs'; | ||
export * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode'; | ||
export * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes'; | ||
export * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession'; | ||
@@ -123,2 +132,3 @@ export * as ComAtprotoServerDefs from './types/com/atproto/server/defs'; | ||
export * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs'; | ||
export * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos'; | ||
export * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'; | ||
@@ -189,2 +199,3 @@ export * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'; | ||
identity: IdentityNS; | ||
label: LabelNS; | ||
moderation: ModerationNS; | ||
@@ -211,2 +222,3 @@ repo: RepoNS; | ||
takeModerationAction(data?: ComAtprotoAdminTakeModerationAction.InputSchema, opts?: ComAtprotoAdminTakeModerationAction.CallOptions): Promise<ComAtprotoAdminTakeModerationAction.Response>; | ||
updateAccountHandle(data?: ComAtprotoAdminUpdateAccountHandle.InputSchema, opts?: ComAtprotoAdminUpdateAccountHandle.CallOptions): Promise<ComAtprotoAdminUpdateAccountHandle.Response>; | ||
} | ||
@@ -219,2 +231,7 @@ export declare class IdentityNS { | ||
} | ||
export declare class LabelNS { | ||
_service: AtpServiceClient; | ||
constructor(service: AtpServiceClient); | ||
queryLabels(params?: ComAtprotoLabelQueryLabels.QueryParams, opts?: ComAtprotoLabelQueryLabels.CallOptions): Promise<ComAtprotoLabelQueryLabels.Response>; | ||
} | ||
export declare class ModerationNS { | ||
@@ -242,2 +259,3 @@ _service: AtpServiceClient; | ||
createInviteCode(data?: ComAtprotoServerCreateInviteCode.InputSchema, opts?: ComAtprotoServerCreateInviteCode.CallOptions): Promise<ComAtprotoServerCreateInviteCode.Response>; | ||
createInviteCodes(data?: ComAtprotoServerCreateInviteCodes.InputSchema, opts?: ComAtprotoServerCreateInviteCodes.CallOptions): Promise<ComAtprotoServerCreateInviteCodes.Response>; | ||
createSession(data?: ComAtprotoServerCreateSession.InputSchema, opts?: ComAtprotoServerCreateSession.CallOptions): Promise<ComAtprotoServerCreateSession.Response>; | ||
@@ -265,2 +283,3 @@ deleteAccount(data?: ComAtprotoServerDeleteAccount.InputSchema, opts?: ComAtprotoServerDeleteAccount.CallOptions): Promise<ComAtprotoServerDeleteAccount.Response>; | ||
listBlobs(params?: ComAtprotoSyncListBlobs.QueryParams, opts?: ComAtprotoSyncListBlobs.CallOptions): Promise<ComAtprotoSyncListBlobs.Response>; | ||
listRepos(params?: ComAtprotoSyncListRepos.QueryParams, opts?: ComAtprotoSyncListRepos.CallOptions): Promise<ComAtprotoSyncListRepos.Response>; | ||
notifyOfUpdate(params?: ComAtprotoSyncNotifyOfUpdate.QueryParams, opts?: ComAtprotoSyncNotifyOfUpdate.CallOptions): Promise<ComAtprotoSyncNotifyOfUpdate.Response>; | ||
@@ -267,0 +286,0 @@ requestCrawl(params?: ComAtprotoSyncRequestCrawl.QueryParams, opts?: ComAtprotoSyncRequestCrawl.CallOptions): Promise<ComAtprotoSyncRequestCrawl.Response>; |
import { ValidationResult } from '@atproto/lexicon'; | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'; | ||
export interface ProfileViewBasic { | ||
@@ -8,2 +9,3 @@ did: string; | ||
viewer?: ViewerState; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
[k: string]: unknown; | ||
@@ -21,2 +23,3 @@ } | ||
viewer?: ViewerState; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
[k: string]: unknown; | ||
@@ -38,2 +41,3 @@ } | ||
viewer?: ViewerState; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
[k: string]: unknown; | ||
@@ -40,0 +44,0 @@ } |
@@ -7,2 +7,3 @@ import { ValidationResult } from '@atproto/lexicon'; | ||
import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia'; | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'; | ||
export interface PostView { | ||
@@ -22,2 +23,3 @@ uri: string; | ||
viewer?: ViewerState; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
[k: string]: unknown; | ||
@@ -24,0 +26,0 @@ } |
import { Headers } from '@atproto/xrpc'; | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
import * as AppBskyActorDefs from '../actor/defs'; | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'; | ||
export interface QueryParams { | ||
@@ -32,2 +33,3 @@ limit?: number; | ||
indexedAt: string; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
[k: string]: unknown; | ||
@@ -34,0 +36,0 @@ } |
@@ -13,2 +13,4 @@ import { ValidationResult } from '@atproto/lexicon'; | ||
subjectBlobCids: string[]; | ||
createLabelVals?: string[]; | ||
negateLabelVals?: string[]; | ||
reason: string; | ||
@@ -31,2 +33,4 @@ createdBy: string; | ||
subjectBlobs: BlobView[]; | ||
createLabelVals?: string[]; | ||
negateLabelVals?: string[]; | ||
reason: string; | ||
@@ -98,3 +102,2 @@ createdBy: string; | ||
invitedBy?: ComAtprotoServerDefs.InviteCode; | ||
invites?: ComAtprotoServerDefs.InviteCode[]; | ||
[k: string]: unknown; | ||
@@ -101,0 +104,0 @@ } |
@@ -13,2 +13,4 @@ import { Headers, XRPCError } from '@atproto/xrpc'; | ||
subjectBlobCids?: string[]; | ||
createLabelVals?: string[]; | ||
negateLabelVals?: string[]; | ||
reason: string; | ||
@@ -15,0 +17,0 @@ createdBy: string; |
@@ -5,3 +5,3 @@ import { Headers, XRPCError } from '@atproto/xrpc'; | ||
export interface InputSchema { | ||
identifier?: string; | ||
identifier: string; | ||
password: string; | ||
@@ -8,0 +8,0 @@ [k: string]: unknown; |
{ | ||
"name": "@atproto/api", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -23,4 +23,8 @@ /** | ||
import * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction' | ||
import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle' | ||
import * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle' | ||
import * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle' | ||
import * as ComAtprotoLabelDefs from './types/com/atproto/label/defs' | ||
import * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels' | ||
import * as ComAtprotoLabelSubscribeLabels from './types/com/atproto/label/subscribeLabels' | ||
import * as ComAtprotoModerationCreateReport from './types/com/atproto/moderation/createReport' | ||
@@ -39,2 +43,3 @@ import * as ComAtprotoModerationDefs from './types/com/atproto/moderation/defs' | ||
import * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode' | ||
import * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes' | ||
import * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession' | ||
@@ -59,2 +64,3 @@ import * as ComAtprotoServerDefs from './types/com/atproto/server/defs' | ||
import * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs' | ||
import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos' | ||
import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate' | ||
@@ -108,4 +114,8 @@ import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl' | ||
export * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction' | ||
export * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle' | ||
export * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle' | ||
export * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle' | ||
export * as ComAtprotoLabelDefs from './types/com/atproto/label/defs' | ||
export * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels' | ||
export * as ComAtprotoLabelSubscribeLabels from './types/com/atproto/label/subscribeLabels' | ||
export * as ComAtprotoModerationCreateReport from './types/com/atproto/moderation/createReport' | ||
@@ -124,2 +134,3 @@ export * as ComAtprotoModerationDefs from './types/com/atproto/moderation/defs' | ||
export * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode' | ||
export * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes' | ||
export * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession' | ||
@@ -144,2 +155,3 @@ export * as ComAtprotoServerDefs from './types/com/atproto/server/defs' | ||
export * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs' | ||
export * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos' | ||
export * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate' | ||
@@ -234,2 +246,3 @@ export * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl' | ||
identity: IdentityNS | ||
label: LabelNS | ||
moderation: ModerationNS | ||
@@ -244,2 +257,3 @@ repo: RepoNS | ||
this.identity = new IdentityNS(service) | ||
this.label = new LabelNS(service) | ||
this.moderation = new ModerationNS(service) | ||
@@ -390,2 +404,13 @@ this.repo = new RepoNS(service) | ||
} | ||
updateAccountHandle( | ||
data?: ComAtprotoAdminUpdateAccountHandle.InputSchema, | ||
opts?: ComAtprotoAdminUpdateAccountHandle.CallOptions, | ||
): Promise<ComAtprotoAdminUpdateAccountHandle.Response> { | ||
return this._service.xrpc | ||
.call('com.atproto.admin.updateAccountHandle', opts?.qp, data, opts) | ||
.catch((e) => { | ||
throw ComAtprotoAdminUpdateAccountHandle.toKnownErr(e) | ||
}) | ||
} | ||
} | ||
@@ -423,2 +448,21 @@ | ||
export class LabelNS { | ||
_service: AtpServiceClient | ||
constructor(service: AtpServiceClient) { | ||
this._service = service | ||
} | ||
queryLabels( | ||
params?: ComAtprotoLabelQueryLabels.QueryParams, | ||
opts?: ComAtprotoLabelQueryLabels.CallOptions, | ||
): Promise<ComAtprotoLabelQueryLabels.Response> { | ||
return this._service.xrpc | ||
.call('com.atproto.label.queryLabels', params, undefined, opts) | ||
.catch((e) => { | ||
throw ComAtprotoLabelQueryLabels.toKnownErr(e) | ||
}) | ||
} | ||
} | ||
export class ModerationNS { | ||
@@ -568,2 +612,13 @@ _service: AtpServiceClient | ||
createInviteCodes( | ||
data?: ComAtprotoServerCreateInviteCodes.InputSchema, | ||
opts?: ComAtprotoServerCreateInviteCodes.CallOptions, | ||
): Promise<ComAtprotoServerCreateInviteCodes.Response> { | ||
return this._service.xrpc | ||
.call('com.atproto.server.createInviteCodes', opts?.qp, data, opts) | ||
.catch((e) => { | ||
throw ComAtprotoServerCreateInviteCodes.toKnownErr(e) | ||
}) | ||
} | ||
createSession( | ||
@@ -775,2 +830,13 @@ data?: ComAtprotoServerCreateSession.InputSchema, | ||
listRepos( | ||
params?: ComAtprotoSyncListRepos.QueryParams, | ||
opts?: ComAtprotoSyncListRepos.CallOptions, | ||
): Promise<ComAtprotoSyncListRepos.Response> { | ||
return this._service.xrpc | ||
.call('com.atproto.sync.listRepos', params, undefined, opts) | ||
.catch((e) => { | ||
throw ComAtprotoSyncListRepos.toKnownErr(e) | ||
}) | ||
} | ||
notifyOfUpdate( | ||
@@ -777,0 +843,0 @@ params?: ComAtprotoSyncNotifyOfUpdate.QueryParams, |
@@ -8,2 +8,3 @@ /** | ||
import { CID } from 'multiformats/cid' | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' | ||
@@ -16,2 +17,3 @@ export interface ProfileViewBasic { | ||
viewer?: ViewerState | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
[k: string]: unknown | ||
@@ -40,2 +42,3 @@ } | ||
viewer?: ViewerState | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
[k: string]: unknown | ||
@@ -68,2 +71,3 @@ } | ||
viewer?: ViewerState | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
[k: string]: unknown | ||
@@ -70,0 +74,0 @@ } |
@@ -13,2 +13,3 @@ /** | ||
import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia' | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' | ||
@@ -31,2 +32,3 @@ export interface PostView { | ||
viewer?: ViewerState | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
[k: string]: unknown | ||
@@ -33,0 +35,0 @@ } |
@@ -10,2 +10,3 @@ /** | ||
import * as AppBskyActorDefs from '../actor/defs' | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' | ||
@@ -58,2 +59,3 @@ export interface QueryParams { | ||
indexedAt: string | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
[k: string]: unknown | ||
@@ -60,0 +62,0 @@ } |
@@ -20,2 +20,4 @@ /** | ||
subjectBlobCids: string[] | ||
createLabelVals?: string[] | ||
negateLabelVals?: string[] | ||
reason: string | ||
@@ -46,2 +48,4 @@ createdBy: string | ||
subjectBlobs: BlobView[] | ||
createLabelVals?: string[] | ||
negateLabelVals?: string[] | ||
reason: string | ||
@@ -174,3 +178,2 @@ createdBy: string | ||
invitedBy?: ComAtprotoServerDefs.InviteCode | ||
invites?: ComAtprotoServerDefs.InviteCode[] | ||
[k: string]: unknown | ||
@@ -177,0 +180,0 @@ } |
@@ -25,2 +25,4 @@ /** | ||
subjectBlobCids?: string[] | ||
createLabelVals?: string[] | ||
negateLabelVals?: string[] | ||
reason: string | ||
@@ -27,0 +29,0 @@ createdBy: string |
@@ -18,5 +18,5 @@ /** | ||
cursor?: string | ||
/** The lowest sort-ordered rkey to start from (exclusive) */ | ||
/** DEPRECATED: The lowest sort-ordered rkey to start from (exclusive) */ | ||
rkeyStart?: string | ||
/** The highest sort-ordered rkey to stop at (exclusive) */ | ||
/** DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) */ | ||
rkeyEnd?: string | ||
@@ -23,0 +23,0 @@ /** Reverse the order of the returned records? */ |
@@ -14,3 +14,3 @@ /** | ||
/** Handle or other identifier supported by the server for the authenticating user. */ | ||
identifier?: string | ||
identifier: string | ||
password: string | ||
@@ -17,0 +17,0 @@ [k: string]: unknown |
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
1872201
140
34529