@atproto/api 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +179 -25
- package/build.js +2 -1
- package/dist/agent.d.ts +11 -6
- package/dist/bsky-agent.d.ts +43 -0
- package/dist/client/index.d.ts +117 -215
- package/dist/client/lexicons.d.ts +1440 -1401
- package/dist/client/types/app/bsky/actor/defs.d.ts +47 -0
- package/dist/client/types/app/bsky/actor/getProfile.d.ts +2 -2
- package/dist/client/types/app/bsky/actor/getProfiles.d.ts +2 -2
- package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +2 -2
- package/dist/client/types/app/bsky/actor/profile.d.ts +4 -60
- package/dist/client/types/app/bsky/actor/searchActors.d.ts +22 -0
- package/dist/client/types/app/bsky/actor/searchActorsTypeahead.d.ts +20 -0
- package/dist/client/types/app/bsky/actor/updateProfile.d.ts +3 -10
- package/dist/client/types/app/bsky/embed/external.d.ts +9 -13
- package/dist/client/types/app/bsky/embed/images.d.ts +9 -13
- package/dist/client/types/app/bsky/embed/record.d.ts +21 -13
- package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts +24 -0
- package/dist/client/types/app/bsky/feed/defs.d.ts +77 -0
- package/dist/client/types/app/bsky/feed/getAuthorFeed.d.ts +4 -4
- package/dist/client/types/app/bsky/feed/getLikes.d.ts +34 -0
- package/dist/client/types/app/bsky/feed/getPostThread.d.ts +2 -24
- package/dist/client/types/app/bsky/feed/getRepostedBy.d.ts +3 -3
- package/dist/client/types/app/bsky/feed/getTimeline.d.ts +3 -3
- package/dist/client/types/app/bsky/feed/like.d.ts +9 -0
- package/dist/client/types/app/bsky/feed/post.d.ts +4 -29
- package/dist/client/types/app/bsky/graph/follow.d.ts +1 -2
- package/dist/client/types/app/bsky/graph/getFollowers.d.ts +5 -5
- package/dist/client/types/app/bsky/graph/getFollows.d.ts +5 -5
- package/dist/client/types/app/bsky/graph/getMutes.d.ts +3 -3
- package/dist/client/types/app/bsky/graph/muteActor.d.ts +17 -0
- package/dist/client/types/app/bsky/graph/unmuteActor.d.ts +17 -0
- package/dist/client/types/app/bsky/notification/getUnreadCount.d.ts +17 -0
- package/dist/client/types/app/bsky/notification/listNotifications.d.ts +35 -0
- package/dist/client/types/app/bsky/richtext/facet.d.ts +30 -0
- package/dist/client/types/app/bsky/unspecced/getPopular.d.ts +21 -0
- package/dist/client/types/com/atproto/admin/defs.d.ts +181 -0
- package/dist/client/types/com/atproto/admin/getModerationAction.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/getModerationActions.d.ts +3 -3
- package/dist/client/types/com/atproto/admin/getModerationReport.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/getModerationReports.d.ts +3 -3
- package/dist/client/types/com/atproto/admin/getRecord.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/getRepo.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/resolveModerationReports.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/reverseModerationAction.d.ts +2 -2
- package/dist/client/types/com/atproto/admin/searchRepos.d.ts +3 -3
- package/dist/client/types/com/atproto/admin/takeModerationAction.d.ts +5 -6
- package/dist/client/types/com/atproto/identity/resolveHandle.d.ts +18 -0
- package/dist/client/types/com/atproto/identity/updateHandle.d.ts +17 -0
- package/dist/client/types/com/atproto/moderation/createReport.d.ts +38 -0
- package/dist/client/types/com/atproto/moderation/defs.d.ts +3 -0
- package/dist/client/types/com/atproto/repo/applyWrites.d.ts +47 -0
- package/dist/client/types/com/atproto/repo/createRecord.d.ts +7 -2
- package/dist/client/types/com/atproto/repo/deleteRecord.d.ts +7 -2
- package/dist/client/types/com/atproto/repo/describeRepo.d.ts +22 -0
- package/dist/client/types/com/atproto/repo/getRecord.d.ts +1 -1
- package/dist/client/types/com/atproto/repo/listRecords.d.ts +3 -3
- package/dist/client/types/com/atproto/repo/putRecord.d.ts +7 -2
- package/dist/client/types/com/atproto/repo/uploadBlob.d.ts +20 -0
- package/dist/client/types/com/atproto/server/createAccount.d.ts +44 -0
- package/dist/client/types/com/atproto/server/createInviteCode.d.ts +22 -0
- package/dist/client/types/com/atproto/server/createSession.d.ts +29 -0
- package/dist/client/types/com/atproto/server/deleteAccount.d.ts +25 -0
- package/dist/client/types/com/atproto/server/deleteSession.d.ts +13 -0
- package/dist/client/types/com/atproto/server/describeServer.d.ts +27 -0
- package/dist/client/types/com/atproto/server/getSession.d.ts +18 -0
- package/dist/client/types/com/atproto/server/refreshSession.d.ts +24 -0
- package/dist/client/types/com/atproto/server/requestAccountDelete.d.ts +13 -0
- package/dist/client/types/com/atproto/server/requestPasswordReset.d.ts +17 -0
- package/dist/client/types/com/atproto/server/resetPassword.d.ts +24 -0
- package/dist/client/types/com/atproto/sync/getBlob.d.ts +15 -0
- package/dist/client/types/com/atproto/sync/listBlobs.d.ts +20 -0
- package/dist/client/types/com/atproto/sync/notifyOfUpdate.d.ts +1 -0
- package/dist/client/types/com/atproto/sync/requestCrawl.d.ts +1 -1
- package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +9 -1
- package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +58 -0
- package/dist/helpers/bsky.d.ts +20 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +8046 -3649
- package/dist/index.js.map +4 -4
- package/dist/mixins/bsky.d.ts +23 -0
- package/dist/rich-text/detection.d.ts +4 -0
- package/dist/rich-text/rich-text.d.ts +39 -0
- package/dist/rich-text/sanitization.d.ts +4 -0
- package/dist/rich-text/sanitize.d.ts +4 -0
- package/dist/rich-text/unicode.d.ts +11 -0
- package/dist/types.d.ts +2 -2
- package/docs/rn-fetch-handler.ts +88 -0
- package/package.json +4 -1
- package/src/agent.ts +51 -15
- package/src/bsky-agent.ts +228 -0
- package/src/client/index.ts +330 -581
- package/src/client/lexicons.ts +1824 -1777
- package/src/client/types/app/bsky/actor/defs.ts +97 -0
- package/src/client/types/app/bsky/actor/getProfile.ts +4 -3
- package/src/client/types/app/bsky/actor/getProfiles.ts +4 -3
- package/src/client/types/app/bsky/actor/getSuggestions.ts +4 -3
- package/src/client/types/app/bsky/actor/profile.ts +5 -95
- package/src/client/types/app/bsky/actor/{searchTypeahead.ts → searchActors.ts} +6 -3
- package/src/client/types/app/bsky/actor/{search.ts → searchActorsTypeahead.ts} +4 -5
- package/src/client/types/app/bsky/embed/external.ts +14 -13
- package/src/client/types/app/bsky/embed/images.ts +14 -15
- package/src/client/types/app/bsky/embed/record.ts +32 -25
- package/src/client/types/app/bsky/embed/recordWithMedia.ts +53 -0
- package/src/client/types/app/bsky/feed/defs.ts +156 -0
- package/src/client/types/app/bsky/feed/getAuthorFeed.ts +6 -5
- package/src/client/types/app/bsky/feed/{getVotes.ts → getLikes.ts} +11 -12
- package/src/client/types/app/bsky/feed/getPostThread.ts +5 -48
- package/src/client/types/app/bsky/feed/getRepostedBy.ts +5 -4
- package/src/client/types/app/bsky/feed/getTimeline.ts +5 -4
- package/src/client/types/app/bsky/feed/{vote.ts → like.ts} +4 -4
- package/src/client/types/app/bsky/feed/post.ts +10 -52
- package/src/client/types/app/bsky/feed/repost.ts +2 -1
- package/src/client/types/app/bsky/graph/follow.ts +3 -3
- package/src/client/types/app/bsky/graph/getFollowers.ts +7 -6
- package/src/client/types/app/bsky/graph/getFollows.ts +7 -6
- package/src/client/types/app/bsky/graph/getMutes.ts +5 -4
- package/src/client/types/app/bsky/graph/{mute.ts → muteActor.ts} +3 -2
- package/src/client/types/app/bsky/graph/{unmute.ts → unmuteActor.ts} +3 -2
- package/src/client/types/app/bsky/notification/{getCount.ts → getUnreadCount.ts} +2 -1
- package/src/client/types/app/bsky/notification/{list.ts → listNotifications.ts} +13 -9
- package/src/client/types/app/bsky/notification/updateSeen.ts +2 -1
- package/src/client/types/app/bsky/richtext/facet.ts +81 -0
- package/src/client/types/app/bsky/unspecced/getPopular.ts +38 -0
- package/src/client/types/com/atproto/admin/defs.ts +366 -0
- package/src/client/types/com/atproto/admin/getModerationAction.ts +4 -3
- package/src/client/types/com/atproto/admin/getModerationActions.ts +5 -4
- package/src/client/types/com/atproto/admin/getModerationReport.ts +4 -3
- package/src/client/types/com/atproto/admin/getModerationReports.ts +5 -4
- package/src/client/types/com/atproto/admin/getRecord.ts +4 -3
- package/src/client/types/com/atproto/admin/getRepo.ts +4 -3
- package/src/client/types/com/atproto/admin/resolveModerationReports.ts +4 -3
- package/src/client/types/com/atproto/admin/reverseModerationAction.ts +4 -3
- package/src/client/types/com/atproto/admin/searchRepos.ts +5 -4
- package/src/client/types/com/atproto/admin/takeModerationAction.ts +10 -10
- package/src/client/types/com/atproto/{handle/resolve.ts → identity/resolveHandle.ts} +2 -1
- package/src/client/types/com/atproto/{handle/update.ts → identity/updateHandle.ts} +2 -1
- package/src/client/types/com/atproto/{report/create.ts → moderation/createReport.ts} +10 -10
- package/src/client/types/com/atproto/moderation/defs.ts +17 -0
- package/src/client/types/com/atproto/repo/{batchWrite.ts → applyWrites.ts} +21 -12
- package/src/client/types/com/atproto/repo/createRecord.ts +15 -3
- package/src/client/types/com/atproto/repo/deleteRecord.ts +15 -3
- package/src/client/types/com/atproto/repo/{describe.ts → describeRepo.ts} +3 -2
- package/src/client/types/com/atproto/repo/getRecord.ts +4 -3
- package/src/client/types/com/atproto/repo/listRecords.ts +7 -6
- package/src/client/types/com/atproto/repo/putRecord.ts +18 -6
- package/src/client/types/com/atproto/repo/strongRef.ts +2 -1
- package/src/client/types/com/atproto/{blob/upload.ts → repo/uploadBlob.ts} +3 -2
- package/src/client/types/com/atproto/{account/create.ts → server/createAccount.ts} +9 -1
- package/src/client/types/com/atproto/{account → server}/createInviteCode.ts +2 -1
- package/src/client/types/com/atproto/{session/create.ts → server/createSession.ts} +2 -1
- package/src/client/types/com/atproto/{account/delete.ts → server/deleteAccount.ts} +2 -1
- package/src/client/types/com/atproto/{account/requestDelete.ts → server/deleteSession.ts} +2 -1
- package/src/client/types/com/atproto/server/{getAccountsConfig.ts → describeServer.ts} +4 -3
- package/src/client/types/com/atproto/{session/get.ts → server/getSession.ts} +2 -1
- package/src/client/types/com/atproto/{session/refresh.ts → server/refreshSession.ts} +2 -1
- package/src/client/types/com/atproto/{session/delete.ts → server/requestAccountDelete.ts} +2 -1
- package/src/client/types/com/atproto/{account → server}/requestPasswordReset.ts +2 -1
- package/src/client/types/com/atproto/{account → server}/resetPassword.ts +2 -1
- package/src/client/types/com/atproto/sync/getBlob.ts +33 -0
- package/src/client/types/com/atproto/sync/getBlocks.ts +2 -1
- package/src/client/types/com/atproto/sync/getCheckout.ts +2 -1
- package/src/client/types/com/atproto/sync/getCommitPath.ts +2 -1
- package/src/client/types/com/atproto/sync/getHead.ts +2 -1
- package/src/client/types/com/atproto/sync/getRecord.ts +2 -1
- package/src/client/types/com/atproto/sync/getRepo.ts +2 -1
- package/src/client/types/com/atproto/sync/listBlobs.ts +40 -0
- package/src/client/types/com/atproto/sync/notifyOfUpdate.ts +6 -2
- package/src/client/types/com/atproto/sync/requestCrawl.ts +3 -2
- package/src/client/types/com/atproto/sync/subscribeRepos.ts +131 -0
- package/src/index.ts +12 -0
- package/src/rich-text/detection.ts +83 -0
- package/src/rich-text/rich-text.ts +401 -0
- package/src/rich-text/sanitization.ts +40 -0
- package/src/rich-text/unicode.ts +47 -0
- package/src/types.ts +2 -2
- package/tests/agent.test.ts +10 -6
- package/tests/bsky-agent.test.ts +140 -0
- package/tests/errors.test.ts +4 -4
- package/tests/rich-text-detection.test.ts +229 -0
- package/tests/rich-text-sanitization.test.ts +211 -0
- package/tests/rich-text.test.ts +661 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/src/client/types/app/bsky/actor/ref.ts +0 -64
- package/src/client/types/app/bsky/actor/updateProfile.ts +0 -71
- package/src/client/types/app/bsky/feed/feedViewPost.ts +0 -64
- package/src/client/types/app/bsky/feed/setVote.ts +0 -40
- package/src/client/types/app/bsky/graph/assertCreator.ts +0 -9
- package/src/client/types/app/bsky/graph/assertMember.ts +0 -9
- package/src/client/types/app/bsky/graph/assertion.ts +0 -27
- package/src/client/types/app/bsky/graph/confirmation.ts +0 -28
- package/src/client/types/app/bsky/system/actorUser.ts +0 -9
- package/src/client/types/app/bsky/system/declRef.ts +0 -26
- package/src/client/types/app/bsky/system/declaration.ts +0 -24
- package/src/client/types/com/atproto/account/get.ts +0 -26
- package/src/client/types/com/atproto/admin/blob.ts +0 -84
- package/src/client/types/com/atproto/admin/moderationAction.ts +0 -118
- package/src/client/types/com/atproto/admin/moderationReport.ts +0 -64
- package/src/client/types/com/atproto/admin/record.ts +0 -92
- package/src/client/types/com/atproto/admin/repo.ts +0 -103
- package/src/client/types/com/atproto/repo/recordRef.ts +0 -25
- package/src/client/types/com/atproto/repo/repoRef.ts +0 -24
- package/src/client/types/com/atproto/report/reasonType.ts +0 -16
- package/src/client/types/com/atproto/report/subject.ts +0 -66
- package/src/client/types/com/atproto/sync/subscribeAllRepos.ts +0 -7
package/src/client/index.ts
CHANGED
|
@@ -6,201 +6,171 @@ import {
|
|
|
6
6
|
ServiceClient as XrpcServiceClient,
|
|
7
7
|
} from '@atproto/xrpc'
|
|
8
8
|
import { schemas } from './lexicons'
|
|
9
|
-
import
|
|
10
|
-
import * as
|
|
11
|
-
import * as ComAtprotoAccountDelete from './types/com/atproto/account/delete'
|
|
12
|
-
import * as ComAtprotoAccountGet from './types/com/atproto/account/get'
|
|
13
|
-
import * as ComAtprotoAccountRequestDelete from './types/com/atproto/account/requestDelete'
|
|
14
|
-
import * as ComAtprotoAccountRequestPasswordReset from './types/com/atproto/account/requestPasswordReset'
|
|
15
|
-
import * as ComAtprotoAccountResetPassword from './types/com/atproto/account/resetPassword'
|
|
16
|
-
import * as ComAtprotoAdminBlob from './types/com/atproto/admin/blob'
|
|
9
|
+
import { CID } from 'multiformats/cid'
|
|
10
|
+
import * as ComAtprotoAdminDefs from './types/com/atproto/admin/defs'
|
|
17
11
|
import * as ComAtprotoAdminGetModerationAction from './types/com/atproto/admin/getModerationAction'
|
|
18
12
|
import * as ComAtprotoAdminGetModerationActions from './types/com/atproto/admin/getModerationActions'
|
|
19
13
|
import * as ComAtprotoAdminGetModerationReport from './types/com/atproto/admin/getModerationReport'
|
|
20
14
|
import * as ComAtprotoAdminGetModerationReports from './types/com/atproto/admin/getModerationReports'
|
|
21
15
|
import * as ComAtprotoAdminGetRecord from './types/com/atproto/admin/getRecord'
|
|
22
16
|
import * as ComAtprotoAdminGetRepo from './types/com/atproto/admin/getRepo'
|
|
23
|
-
import * as ComAtprotoAdminModerationAction from './types/com/atproto/admin/moderationAction'
|
|
24
|
-
import * as ComAtprotoAdminModerationReport from './types/com/atproto/admin/moderationReport'
|
|
25
|
-
import * as ComAtprotoAdminRecord from './types/com/atproto/admin/record'
|
|
26
|
-
import * as ComAtprotoAdminRepo from './types/com/atproto/admin/repo'
|
|
27
17
|
import * as ComAtprotoAdminResolveModerationReports from './types/com/atproto/admin/resolveModerationReports'
|
|
28
18
|
import * as ComAtprotoAdminReverseModerationAction from './types/com/atproto/admin/reverseModerationAction'
|
|
29
19
|
import * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRepos'
|
|
30
20
|
import * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction'
|
|
31
|
-
import * as
|
|
32
|
-
import * as
|
|
33
|
-
import * as
|
|
34
|
-
import * as
|
|
21
|
+
import * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle'
|
|
22
|
+
import * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle'
|
|
23
|
+
import * as ComAtprotoModerationCreateReport from './types/com/atproto/moderation/createReport'
|
|
24
|
+
import * as ComAtprotoModerationDefs from './types/com/atproto/moderation/defs'
|
|
25
|
+
import * as ComAtprotoRepoApplyWrites from './types/com/atproto/repo/applyWrites'
|
|
35
26
|
import * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createRecord'
|
|
36
27
|
import * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord'
|
|
37
|
-
import * as
|
|
28
|
+
import * as ComAtprotoRepoDescribeRepo from './types/com/atproto/repo/describeRepo'
|
|
38
29
|
import * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord'
|
|
39
30
|
import * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords'
|
|
40
31
|
import * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord'
|
|
41
|
-
import * as ComAtprotoRepoRecordRef from './types/com/atproto/repo/recordRef'
|
|
42
|
-
import * as ComAtprotoRepoRepoRef from './types/com/atproto/repo/repoRef'
|
|
43
32
|
import * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef'
|
|
44
|
-
import * as
|
|
45
|
-
import * as
|
|
46
|
-
import * as
|
|
47
|
-
import * as
|
|
48
|
-
import * as
|
|
49
|
-
import * as
|
|
50
|
-
import * as
|
|
51
|
-
import * as
|
|
33
|
+
import * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob'
|
|
34
|
+
import * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount'
|
|
35
|
+
import * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode'
|
|
36
|
+
import * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession'
|
|
37
|
+
import * as ComAtprotoServerDeleteAccount from './types/com/atproto/server/deleteAccount'
|
|
38
|
+
import * as ComAtprotoServerDeleteSession from './types/com/atproto/server/deleteSession'
|
|
39
|
+
import * as ComAtprotoServerDescribeServer from './types/com/atproto/server/describeServer'
|
|
40
|
+
import * as ComAtprotoServerGetSession from './types/com/atproto/server/getSession'
|
|
41
|
+
import * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession'
|
|
42
|
+
import * as ComAtprotoServerRequestAccountDelete from './types/com/atproto/server/requestAccountDelete'
|
|
43
|
+
import * as ComAtprotoServerRequestPasswordReset from './types/com/atproto/server/requestPasswordReset'
|
|
44
|
+
import * as ComAtprotoServerResetPassword from './types/com/atproto/server/resetPassword'
|
|
45
|
+
import * as ComAtprotoSyncGetBlob from './types/com/atproto/sync/getBlob'
|
|
52
46
|
import * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks'
|
|
53
47
|
import * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout'
|
|
54
48
|
import * as ComAtprotoSyncGetCommitPath from './types/com/atproto/sync/getCommitPath'
|
|
55
49
|
import * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead'
|
|
56
50
|
import * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord'
|
|
57
51
|
import * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo'
|
|
52
|
+
import * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs'
|
|
58
53
|
import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'
|
|
59
54
|
import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'
|
|
60
|
-
import * as
|
|
55
|
+
import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'
|
|
56
|
+
import * as AppBskyActorDefs from './types/app/bsky/actor/defs'
|
|
61
57
|
import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'
|
|
62
58
|
import * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles'
|
|
63
59
|
import * as AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestions'
|
|
64
60
|
import * as AppBskyActorProfile from './types/app/bsky/actor/profile'
|
|
65
|
-
import * as
|
|
66
|
-
import * as
|
|
67
|
-
import * as AppBskyActorSearchTypeahead from './types/app/bsky/actor/searchTypeahead'
|
|
68
|
-
import * as AppBskyActorUpdateProfile from './types/app/bsky/actor/updateProfile'
|
|
61
|
+
import * as AppBskyActorSearchActors from './types/app/bsky/actor/searchActors'
|
|
62
|
+
import * as AppBskyActorSearchActorsTypeahead from './types/app/bsky/actor/searchActorsTypeahead'
|
|
69
63
|
import * as AppBskyEmbedExternal from './types/app/bsky/embed/external'
|
|
70
64
|
import * as AppBskyEmbedImages from './types/app/bsky/embed/images'
|
|
71
65
|
import * as AppBskyEmbedRecord from './types/app/bsky/embed/record'
|
|
72
|
-
import * as
|
|
66
|
+
import * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia'
|
|
67
|
+
import * as AppBskyFeedDefs from './types/app/bsky/feed/defs'
|
|
73
68
|
import * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed'
|
|
69
|
+
import * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes'
|
|
74
70
|
import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread'
|
|
75
71
|
import * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy'
|
|
76
72
|
import * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline'
|
|
77
|
-
import * as
|
|
73
|
+
import * as AppBskyFeedLike from './types/app/bsky/feed/like'
|
|
78
74
|
import * as AppBskyFeedPost from './types/app/bsky/feed/post'
|
|
79
75
|
import * as AppBskyFeedRepost from './types/app/bsky/feed/repost'
|
|
80
|
-
import * as AppBskyFeedSetVote from './types/app/bsky/feed/setVote'
|
|
81
|
-
import * as AppBskyFeedVote from './types/app/bsky/feed/vote'
|
|
82
|
-
import * as AppBskyGraphAssertCreator from './types/app/bsky/graph/assertCreator'
|
|
83
|
-
import * as AppBskyGraphAssertMember from './types/app/bsky/graph/assertMember'
|
|
84
|
-
import * as AppBskyGraphAssertion from './types/app/bsky/graph/assertion'
|
|
85
|
-
import * as AppBskyGraphConfirmation from './types/app/bsky/graph/confirmation'
|
|
86
76
|
import * as AppBskyGraphFollow from './types/app/bsky/graph/follow'
|
|
87
77
|
import * as AppBskyGraphGetFollowers from './types/app/bsky/graph/getFollowers'
|
|
88
78
|
import * as AppBskyGraphGetFollows from './types/app/bsky/graph/getFollows'
|
|
89
79
|
import * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes'
|
|
90
|
-
import * as
|
|
91
|
-
import * as
|
|
92
|
-
import * as
|
|
93
|
-
import * as
|
|
80
|
+
import * as AppBskyGraphMuteActor from './types/app/bsky/graph/muteActor'
|
|
81
|
+
import * as AppBskyGraphUnmuteActor from './types/app/bsky/graph/unmuteActor'
|
|
82
|
+
import * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notification/getUnreadCount'
|
|
83
|
+
import * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications'
|
|
94
84
|
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
|
|
95
|
-
import * as
|
|
96
|
-
import * as
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
export * as ComAtprotoAccountCreate from './types/com/atproto/account/create'
|
|
100
|
-
export * as ComAtprotoAccountCreateInviteCode from './types/com/atproto/account/createInviteCode'
|
|
101
|
-
export * as ComAtprotoAccountDelete from './types/com/atproto/account/delete'
|
|
102
|
-
export * as ComAtprotoAccountGet from './types/com/atproto/account/get'
|
|
103
|
-
export * as ComAtprotoAccountRequestDelete from './types/com/atproto/account/requestDelete'
|
|
104
|
-
export * as ComAtprotoAccountRequestPasswordReset from './types/com/atproto/account/requestPasswordReset'
|
|
105
|
-
export * as ComAtprotoAccountResetPassword from './types/com/atproto/account/resetPassword'
|
|
106
|
-
export * as ComAtprotoAdminBlob from './types/com/atproto/admin/blob'
|
|
85
|
+
import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
|
|
86
|
+
import * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
|
|
87
|
+
|
|
88
|
+
export * as ComAtprotoAdminDefs from './types/com/atproto/admin/defs'
|
|
107
89
|
export * as ComAtprotoAdminGetModerationAction from './types/com/atproto/admin/getModerationAction'
|
|
108
90
|
export * as ComAtprotoAdminGetModerationActions from './types/com/atproto/admin/getModerationActions'
|
|
109
91
|
export * as ComAtprotoAdminGetModerationReport from './types/com/atproto/admin/getModerationReport'
|
|
110
92
|
export * as ComAtprotoAdminGetModerationReports from './types/com/atproto/admin/getModerationReports'
|
|
111
93
|
export * as ComAtprotoAdminGetRecord from './types/com/atproto/admin/getRecord'
|
|
112
94
|
export * as ComAtprotoAdminGetRepo from './types/com/atproto/admin/getRepo'
|
|
113
|
-
export * as ComAtprotoAdminModerationAction from './types/com/atproto/admin/moderationAction'
|
|
114
|
-
export * as ComAtprotoAdminModerationReport from './types/com/atproto/admin/moderationReport'
|
|
115
|
-
export * as ComAtprotoAdminRecord from './types/com/atproto/admin/record'
|
|
116
|
-
export * as ComAtprotoAdminRepo from './types/com/atproto/admin/repo'
|
|
117
95
|
export * as ComAtprotoAdminResolveModerationReports from './types/com/atproto/admin/resolveModerationReports'
|
|
118
96
|
export * as ComAtprotoAdminReverseModerationAction from './types/com/atproto/admin/reverseModerationAction'
|
|
119
97
|
export * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRepos'
|
|
120
98
|
export * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction'
|
|
121
|
-
export * as
|
|
122
|
-
export * as
|
|
123
|
-
export * as
|
|
124
|
-
export * as
|
|
99
|
+
export * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle'
|
|
100
|
+
export * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle'
|
|
101
|
+
export * as ComAtprotoModerationCreateReport from './types/com/atproto/moderation/createReport'
|
|
102
|
+
export * as ComAtprotoModerationDefs from './types/com/atproto/moderation/defs'
|
|
103
|
+
export * as ComAtprotoRepoApplyWrites from './types/com/atproto/repo/applyWrites'
|
|
125
104
|
export * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createRecord'
|
|
126
105
|
export * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord'
|
|
127
|
-
export * as
|
|
106
|
+
export * as ComAtprotoRepoDescribeRepo from './types/com/atproto/repo/describeRepo'
|
|
128
107
|
export * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord'
|
|
129
108
|
export * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords'
|
|
130
109
|
export * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord'
|
|
131
|
-
export * as ComAtprotoRepoRecordRef from './types/com/atproto/repo/recordRef'
|
|
132
|
-
export * as ComAtprotoRepoRepoRef from './types/com/atproto/repo/repoRef'
|
|
133
110
|
export * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef'
|
|
134
|
-
export * as
|
|
135
|
-
export * as
|
|
136
|
-
export * as
|
|
137
|
-
export * as
|
|
138
|
-
export * as
|
|
139
|
-
export * as
|
|
140
|
-
export * as
|
|
141
|
-
export * as
|
|
111
|
+
export * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob'
|
|
112
|
+
export * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount'
|
|
113
|
+
export * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode'
|
|
114
|
+
export * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession'
|
|
115
|
+
export * as ComAtprotoServerDeleteAccount from './types/com/atproto/server/deleteAccount'
|
|
116
|
+
export * as ComAtprotoServerDeleteSession from './types/com/atproto/server/deleteSession'
|
|
117
|
+
export * as ComAtprotoServerDescribeServer from './types/com/atproto/server/describeServer'
|
|
118
|
+
export * as ComAtprotoServerGetSession from './types/com/atproto/server/getSession'
|
|
119
|
+
export * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession'
|
|
120
|
+
export * as ComAtprotoServerRequestAccountDelete from './types/com/atproto/server/requestAccountDelete'
|
|
121
|
+
export * as ComAtprotoServerRequestPasswordReset from './types/com/atproto/server/requestPasswordReset'
|
|
122
|
+
export * as ComAtprotoServerResetPassword from './types/com/atproto/server/resetPassword'
|
|
123
|
+
export * as ComAtprotoSyncGetBlob from './types/com/atproto/sync/getBlob'
|
|
142
124
|
export * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks'
|
|
143
125
|
export * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout'
|
|
144
126
|
export * as ComAtprotoSyncGetCommitPath from './types/com/atproto/sync/getCommitPath'
|
|
145
127
|
export * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead'
|
|
146
128
|
export * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord'
|
|
147
129
|
export * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo'
|
|
130
|
+
export * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs'
|
|
148
131
|
export * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'
|
|
149
132
|
export * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'
|
|
150
|
-
export * as
|
|
133
|
+
export * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'
|
|
134
|
+
export * as AppBskyActorDefs from './types/app/bsky/actor/defs'
|
|
151
135
|
export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'
|
|
152
136
|
export * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles'
|
|
153
137
|
export * as AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestions'
|
|
154
138
|
export * as AppBskyActorProfile from './types/app/bsky/actor/profile'
|
|
155
|
-
export * as
|
|
156
|
-
export * as
|
|
157
|
-
export * as AppBskyActorSearchTypeahead from './types/app/bsky/actor/searchTypeahead'
|
|
158
|
-
export * as AppBskyActorUpdateProfile from './types/app/bsky/actor/updateProfile'
|
|
139
|
+
export * as AppBskyActorSearchActors from './types/app/bsky/actor/searchActors'
|
|
140
|
+
export * as AppBskyActorSearchActorsTypeahead from './types/app/bsky/actor/searchActorsTypeahead'
|
|
159
141
|
export * as AppBskyEmbedExternal from './types/app/bsky/embed/external'
|
|
160
142
|
export * as AppBskyEmbedImages from './types/app/bsky/embed/images'
|
|
161
143
|
export * as AppBskyEmbedRecord from './types/app/bsky/embed/record'
|
|
162
|
-
export * as
|
|
144
|
+
export * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia'
|
|
145
|
+
export * as AppBskyFeedDefs from './types/app/bsky/feed/defs'
|
|
163
146
|
export * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed'
|
|
147
|
+
export * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes'
|
|
164
148
|
export * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread'
|
|
165
149
|
export * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy'
|
|
166
150
|
export * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline'
|
|
167
|
-
export * as
|
|
151
|
+
export * as AppBskyFeedLike from './types/app/bsky/feed/like'
|
|
168
152
|
export * as AppBskyFeedPost from './types/app/bsky/feed/post'
|
|
169
153
|
export * as AppBskyFeedRepost from './types/app/bsky/feed/repost'
|
|
170
|
-
export * as AppBskyFeedSetVote from './types/app/bsky/feed/setVote'
|
|
171
|
-
export * as AppBskyFeedVote from './types/app/bsky/feed/vote'
|
|
172
|
-
export * as AppBskyGraphAssertCreator from './types/app/bsky/graph/assertCreator'
|
|
173
|
-
export * as AppBskyGraphAssertMember from './types/app/bsky/graph/assertMember'
|
|
174
|
-
export * as AppBskyGraphAssertion from './types/app/bsky/graph/assertion'
|
|
175
|
-
export * as AppBskyGraphConfirmation from './types/app/bsky/graph/confirmation'
|
|
176
154
|
export * as AppBskyGraphFollow from './types/app/bsky/graph/follow'
|
|
177
155
|
export * as AppBskyGraphGetFollowers from './types/app/bsky/graph/getFollowers'
|
|
178
156
|
export * as AppBskyGraphGetFollows from './types/app/bsky/graph/getFollows'
|
|
179
157
|
export * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes'
|
|
180
|
-
export * as
|
|
181
|
-
export * as
|
|
182
|
-
export * as
|
|
183
|
-
export * as
|
|
158
|
+
export * as AppBskyGraphMuteActor from './types/app/bsky/graph/muteActor'
|
|
159
|
+
export * as AppBskyGraphUnmuteActor from './types/app/bsky/graph/unmuteActor'
|
|
160
|
+
export * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notification/getUnreadCount'
|
|
161
|
+
export * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications'
|
|
184
162
|
export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
|
|
185
|
-
export * as
|
|
186
|
-
export * as
|
|
187
|
-
export * as AppBskySystemDeclaration from './types/app/bsky/system/declaration'
|
|
163
|
+
export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
|
|
164
|
+
export * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
|
|
188
165
|
|
|
189
166
|
export const COM_ATPROTO_ADMIN = {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
export const COM_ATPROTO_REPORT = {
|
|
195
|
-
ReasonTypeSpam: 'com.atproto.report.reasonType#spam',
|
|
196
|
-
ReasonTypeOther: 'com.atproto.report.reasonType#other',
|
|
197
|
-
}
|
|
198
|
-
export const APP_BSKY_GRAPH = {
|
|
199
|
-
AssertCreator: 'app.bsky.graph.assertCreator',
|
|
200
|
-
AssertMember: 'app.bsky.graph.assertMember',
|
|
167
|
+
DefsTakedown: 'com.atproto.admin.defs#takedown',
|
|
168
|
+
DefsFlag: 'com.atproto.admin.defs#flag',
|
|
169
|
+
DefsAcknowledge: 'com.atproto.admin.defs#acknowledge',
|
|
201
170
|
}
|
|
202
|
-
export const
|
|
203
|
-
|
|
171
|
+
export const COM_ATPROTO_MODERATION = {
|
|
172
|
+
DefsReasonSpam: 'com.atproto.moderation.defs#reasonSpam',
|
|
173
|
+
DefsReasonOther: 'com.atproto.moderation.defs#reasonOther',
|
|
204
174
|
}
|
|
205
175
|
|
|
206
176
|
export class AtpBaseClient {
|
|
@@ -245,115 +215,24 @@ export class ComNS {
|
|
|
245
215
|
|
|
246
216
|
export class AtprotoNS {
|
|
247
217
|
_service: AtpServiceClient
|
|
248
|
-
account: AccountNS
|
|
249
218
|
admin: AdminNS
|
|
250
|
-
|
|
251
|
-
|
|
219
|
+
identity: IdentityNS
|
|
220
|
+
moderation: ModerationNS
|
|
252
221
|
repo: RepoNS
|
|
253
|
-
report: ReportNS
|
|
254
222
|
server: ServerNS
|
|
255
|
-
session: SessionNS
|
|
256
223
|
sync: SyncNS
|
|
257
224
|
|
|
258
225
|
constructor(service: AtpServiceClient) {
|
|
259
226
|
this._service = service
|
|
260
|
-
this.account = new AccountNS(service)
|
|
261
227
|
this.admin = new AdminNS(service)
|
|
262
|
-
this.
|
|
263
|
-
this.
|
|
228
|
+
this.identity = new IdentityNS(service)
|
|
229
|
+
this.moderation = new ModerationNS(service)
|
|
264
230
|
this.repo = new RepoNS(service)
|
|
265
|
-
this.report = new ReportNS(service)
|
|
266
231
|
this.server = new ServerNS(service)
|
|
267
|
-
this.session = new SessionNS(service)
|
|
268
232
|
this.sync = new SyncNS(service)
|
|
269
233
|
}
|
|
270
234
|
}
|
|
271
235
|
|
|
272
|
-
export class AccountNS {
|
|
273
|
-
_service: AtpServiceClient
|
|
274
|
-
|
|
275
|
-
constructor(service: AtpServiceClient) {
|
|
276
|
-
this._service = service
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
create(
|
|
280
|
-
data?: ComAtprotoAccountCreate.InputSchema,
|
|
281
|
-
opts?: ComAtprotoAccountCreate.CallOptions,
|
|
282
|
-
): Promise<ComAtprotoAccountCreate.Response> {
|
|
283
|
-
return this._service.xrpc
|
|
284
|
-
.call('com.atproto.account.create', opts?.qp, data, opts)
|
|
285
|
-
.catch((e) => {
|
|
286
|
-
throw ComAtprotoAccountCreate.toKnownErr(e)
|
|
287
|
-
})
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
createInviteCode(
|
|
291
|
-
data?: ComAtprotoAccountCreateInviteCode.InputSchema,
|
|
292
|
-
opts?: ComAtprotoAccountCreateInviteCode.CallOptions,
|
|
293
|
-
): Promise<ComAtprotoAccountCreateInviteCode.Response> {
|
|
294
|
-
return this._service.xrpc
|
|
295
|
-
.call('com.atproto.account.createInviteCode', opts?.qp, data, opts)
|
|
296
|
-
.catch((e) => {
|
|
297
|
-
throw ComAtprotoAccountCreateInviteCode.toKnownErr(e)
|
|
298
|
-
})
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
delete(
|
|
302
|
-
data?: ComAtprotoAccountDelete.InputSchema,
|
|
303
|
-
opts?: ComAtprotoAccountDelete.CallOptions,
|
|
304
|
-
): Promise<ComAtprotoAccountDelete.Response> {
|
|
305
|
-
return this._service.xrpc
|
|
306
|
-
.call('com.atproto.account.delete', opts?.qp, data, opts)
|
|
307
|
-
.catch((e) => {
|
|
308
|
-
throw ComAtprotoAccountDelete.toKnownErr(e)
|
|
309
|
-
})
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
get(
|
|
313
|
-
params?: ComAtprotoAccountGet.QueryParams,
|
|
314
|
-
opts?: ComAtprotoAccountGet.CallOptions,
|
|
315
|
-
): Promise<ComAtprotoAccountGet.Response> {
|
|
316
|
-
return this._service.xrpc
|
|
317
|
-
.call('com.atproto.account.get', params, undefined, opts)
|
|
318
|
-
.catch((e) => {
|
|
319
|
-
throw ComAtprotoAccountGet.toKnownErr(e)
|
|
320
|
-
})
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
requestDelete(
|
|
324
|
-
data?: ComAtprotoAccountRequestDelete.InputSchema,
|
|
325
|
-
opts?: ComAtprotoAccountRequestDelete.CallOptions,
|
|
326
|
-
): Promise<ComAtprotoAccountRequestDelete.Response> {
|
|
327
|
-
return this._service.xrpc
|
|
328
|
-
.call('com.atproto.account.requestDelete', opts?.qp, data, opts)
|
|
329
|
-
.catch((e) => {
|
|
330
|
-
throw ComAtprotoAccountRequestDelete.toKnownErr(e)
|
|
331
|
-
})
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
requestPasswordReset(
|
|
335
|
-
data?: ComAtprotoAccountRequestPasswordReset.InputSchema,
|
|
336
|
-
opts?: ComAtprotoAccountRequestPasswordReset.CallOptions,
|
|
337
|
-
): Promise<ComAtprotoAccountRequestPasswordReset.Response> {
|
|
338
|
-
return this._service.xrpc
|
|
339
|
-
.call('com.atproto.account.requestPasswordReset', opts?.qp, data, opts)
|
|
340
|
-
.catch((e) => {
|
|
341
|
-
throw ComAtprotoAccountRequestPasswordReset.toKnownErr(e)
|
|
342
|
-
})
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
resetPassword(
|
|
346
|
-
data?: ComAtprotoAccountResetPassword.InputSchema,
|
|
347
|
-
opts?: ComAtprotoAccountResetPassword.CallOptions,
|
|
348
|
-
): Promise<ComAtprotoAccountResetPassword.Response> {
|
|
349
|
-
return this._service.xrpc
|
|
350
|
-
.call('com.atproto.account.resetPassword', opts?.qp, data, opts)
|
|
351
|
-
.catch((e) => {
|
|
352
|
-
throw ComAtprotoAccountResetPassword.toKnownErr(e)
|
|
353
|
-
})
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
236
|
export class AdminNS {
|
|
358
237
|
_service: AtpServiceClient
|
|
359
238
|
|
|
@@ -472,51 +351,51 @@ export class AdminNS {
|
|
|
472
351
|
}
|
|
473
352
|
}
|
|
474
353
|
|
|
475
|
-
export class
|
|
354
|
+
export class IdentityNS {
|
|
476
355
|
_service: AtpServiceClient
|
|
477
356
|
|
|
478
357
|
constructor(service: AtpServiceClient) {
|
|
479
358
|
this._service = service
|
|
480
359
|
}
|
|
481
360
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
opts?:
|
|
485
|
-
): Promise<
|
|
361
|
+
resolveHandle(
|
|
362
|
+
params?: ComAtprotoIdentityResolveHandle.QueryParams,
|
|
363
|
+
opts?: ComAtprotoIdentityResolveHandle.CallOptions,
|
|
364
|
+
): Promise<ComAtprotoIdentityResolveHandle.Response> {
|
|
365
|
+
return this._service.xrpc
|
|
366
|
+
.call('com.atproto.identity.resolveHandle', params, undefined, opts)
|
|
367
|
+
.catch((e) => {
|
|
368
|
+
throw ComAtprotoIdentityResolveHandle.toKnownErr(e)
|
|
369
|
+
})
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
updateHandle(
|
|
373
|
+
data?: ComAtprotoIdentityUpdateHandle.InputSchema,
|
|
374
|
+
opts?: ComAtprotoIdentityUpdateHandle.CallOptions,
|
|
375
|
+
): Promise<ComAtprotoIdentityUpdateHandle.Response> {
|
|
486
376
|
return this._service.xrpc
|
|
487
|
-
.call('com.atproto.
|
|
377
|
+
.call('com.atproto.identity.updateHandle', opts?.qp, data, opts)
|
|
488
378
|
.catch((e) => {
|
|
489
|
-
throw
|
|
379
|
+
throw ComAtprotoIdentityUpdateHandle.toKnownErr(e)
|
|
490
380
|
})
|
|
491
381
|
}
|
|
492
382
|
}
|
|
493
383
|
|
|
494
|
-
export class
|
|
384
|
+
export class ModerationNS {
|
|
495
385
|
_service: AtpServiceClient
|
|
496
386
|
|
|
497
387
|
constructor(service: AtpServiceClient) {
|
|
498
388
|
this._service = service
|
|
499
389
|
}
|
|
500
390
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
opts?:
|
|
504
|
-
): Promise<
|
|
505
|
-
return this._service.xrpc
|
|
506
|
-
.call('com.atproto.handle.resolve', params, undefined, opts)
|
|
507
|
-
.catch((e) => {
|
|
508
|
-
throw ComAtprotoHandleResolve.toKnownErr(e)
|
|
509
|
-
})
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
update(
|
|
513
|
-
data?: ComAtprotoHandleUpdate.InputSchema,
|
|
514
|
-
opts?: ComAtprotoHandleUpdate.CallOptions,
|
|
515
|
-
): Promise<ComAtprotoHandleUpdate.Response> {
|
|
391
|
+
createReport(
|
|
392
|
+
data?: ComAtprotoModerationCreateReport.InputSchema,
|
|
393
|
+
opts?: ComAtprotoModerationCreateReport.CallOptions,
|
|
394
|
+
): Promise<ComAtprotoModerationCreateReport.Response> {
|
|
516
395
|
return this._service.xrpc
|
|
517
|
-
.call('com.atproto.
|
|
396
|
+
.call('com.atproto.moderation.createReport', opts?.qp, data, opts)
|
|
518
397
|
.catch((e) => {
|
|
519
|
-
throw
|
|
398
|
+
throw ComAtprotoModerationCreateReport.toKnownErr(e)
|
|
520
399
|
})
|
|
521
400
|
}
|
|
522
401
|
}
|
|
@@ -528,14 +407,14 @@ export class RepoNS {
|
|
|
528
407
|
this._service = service
|
|
529
408
|
}
|
|
530
409
|
|
|
531
|
-
|
|
532
|
-
data?:
|
|
533
|
-
opts?:
|
|
534
|
-
): Promise<
|
|
410
|
+
applyWrites(
|
|
411
|
+
data?: ComAtprotoRepoApplyWrites.InputSchema,
|
|
412
|
+
opts?: ComAtprotoRepoApplyWrites.CallOptions,
|
|
413
|
+
): Promise<ComAtprotoRepoApplyWrites.Response> {
|
|
535
414
|
return this._service.xrpc
|
|
536
|
-
.call('com.atproto.repo.
|
|
415
|
+
.call('com.atproto.repo.applyWrites', opts?.qp, data, opts)
|
|
537
416
|
.catch((e) => {
|
|
538
|
-
throw
|
|
417
|
+
throw ComAtprotoRepoApplyWrites.toKnownErr(e)
|
|
539
418
|
})
|
|
540
419
|
}
|
|
541
420
|
|
|
@@ -561,14 +440,14 @@ export class RepoNS {
|
|
|
561
440
|
})
|
|
562
441
|
}
|
|
563
442
|
|
|
564
|
-
|
|
565
|
-
params?:
|
|
566
|
-
opts?:
|
|
567
|
-
): Promise<
|
|
443
|
+
describeRepo(
|
|
444
|
+
params?: ComAtprotoRepoDescribeRepo.QueryParams,
|
|
445
|
+
opts?: ComAtprotoRepoDescribeRepo.CallOptions,
|
|
446
|
+
): Promise<ComAtprotoRepoDescribeRepo.Response> {
|
|
568
447
|
return this._service.xrpc
|
|
569
|
-
.call('com.atproto.repo.
|
|
448
|
+
.call('com.atproto.repo.describeRepo', params, undefined, opts)
|
|
570
449
|
.catch((e) => {
|
|
571
|
-
throw
|
|
450
|
+
throw ComAtprotoRepoDescribeRepo.toKnownErr(e)
|
|
572
451
|
})
|
|
573
452
|
}
|
|
574
453
|
|
|
@@ -604,94 +483,144 @@ export class RepoNS {
|
|
|
604
483
|
throw ComAtprotoRepoPutRecord.toKnownErr(e)
|
|
605
484
|
})
|
|
606
485
|
}
|
|
486
|
+
|
|
487
|
+
uploadBlob(
|
|
488
|
+
data?: ComAtprotoRepoUploadBlob.InputSchema,
|
|
489
|
+
opts?: ComAtprotoRepoUploadBlob.CallOptions,
|
|
490
|
+
): Promise<ComAtprotoRepoUploadBlob.Response> {
|
|
491
|
+
return this._service.xrpc
|
|
492
|
+
.call('com.atproto.repo.uploadBlob', opts?.qp, data, opts)
|
|
493
|
+
.catch((e) => {
|
|
494
|
+
throw ComAtprotoRepoUploadBlob.toKnownErr(e)
|
|
495
|
+
})
|
|
496
|
+
}
|
|
607
497
|
}
|
|
608
498
|
|
|
609
|
-
export class
|
|
499
|
+
export class ServerNS {
|
|
610
500
|
_service: AtpServiceClient
|
|
611
501
|
|
|
612
502
|
constructor(service: AtpServiceClient) {
|
|
613
503
|
this._service = service
|
|
614
504
|
}
|
|
615
505
|
|
|
616
|
-
|
|
617
|
-
data?:
|
|
618
|
-
opts?:
|
|
619
|
-
): Promise<
|
|
506
|
+
createAccount(
|
|
507
|
+
data?: ComAtprotoServerCreateAccount.InputSchema,
|
|
508
|
+
opts?: ComAtprotoServerCreateAccount.CallOptions,
|
|
509
|
+
): Promise<ComAtprotoServerCreateAccount.Response> {
|
|
620
510
|
return this._service.xrpc
|
|
621
|
-
.call('com.atproto.
|
|
511
|
+
.call('com.atproto.server.createAccount', opts?.qp, data, opts)
|
|
622
512
|
.catch((e) => {
|
|
623
|
-
throw
|
|
513
|
+
throw ComAtprotoServerCreateAccount.toKnownErr(e)
|
|
624
514
|
})
|
|
625
515
|
}
|
|
626
|
-
}
|
|
627
516
|
|
|
628
|
-
|
|
629
|
-
|
|
517
|
+
createInviteCode(
|
|
518
|
+
data?: ComAtprotoServerCreateInviteCode.InputSchema,
|
|
519
|
+
opts?: ComAtprotoServerCreateInviteCode.CallOptions,
|
|
520
|
+
): Promise<ComAtprotoServerCreateInviteCode.Response> {
|
|
521
|
+
return this._service.xrpc
|
|
522
|
+
.call('com.atproto.server.createInviteCode', opts?.qp, data, opts)
|
|
523
|
+
.catch((e) => {
|
|
524
|
+
throw ComAtprotoServerCreateInviteCode.toKnownErr(e)
|
|
525
|
+
})
|
|
526
|
+
}
|
|
630
527
|
|
|
631
|
-
|
|
632
|
-
|
|
528
|
+
createSession(
|
|
529
|
+
data?: ComAtprotoServerCreateSession.InputSchema,
|
|
530
|
+
opts?: ComAtprotoServerCreateSession.CallOptions,
|
|
531
|
+
): Promise<ComAtprotoServerCreateSession.Response> {
|
|
532
|
+
return this._service.xrpc
|
|
533
|
+
.call('com.atproto.server.createSession', opts?.qp, data, opts)
|
|
534
|
+
.catch((e) => {
|
|
535
|
+
throw ComAtprotoServerCreateSession.toKnownErr(e)
|
|
536
|
+
})
|
|
633
537
|
}
|
|
634
538
|
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
opts?:
|
|
638
|
-
): Promise<
|
|
539
|
+
deleteAccount(
|
|
540
|
+
data?: ComAtprotoServerDeleteAccount.InputSchema,
|
|
541
|
+
opts?: ComAtprotoServerDeleteAccount.CallOptions,
|
|
542
|
+
): Promise<ComAtprotoServerDeleteAccount.Response> {
|
|
639
543
|
return this._service.xrpc
|
|
640
|
-
.call('com.atproto.server.
|
|
544
|
+
.call('com.atproto.server.deleteAccount', opts?.qp, data, opts)
|
|
641
545
|
.catch((e) => {
|
|
642
|
-
throw
|
|
546
|
+
throw ComAtprotoServerDeleteAccount.toKnownErr(e)
|
|
643
547
|
})
|
|
644
548
|
}
|
|
645
|
-
}
|
|
646
549
|
|
|
647
|
-
|
|
648
|
-
|
|
550
|
+
deleteSession(
|
|
551
|
+
data?: ComAtprotoServerDeleteSession.InputSchema,
|
|
552
|
+
opts?: ComAtprotoServerDeleteSession.CallOptions,
|
|
553
|
+
): Promise<ComAtprotoServerDeleteSession.Response> {
|
|
554
|
+
return this._service.xrpc
|
|
555
|
+
.call('com.atproto.server.deleteSession', opts?.qp, data, opts)
|
|
556
|
+
.catch((e) => {
|
|
557
|
+
throw ComAtprotoServerDeleteSession.toKnownErr(e)
|
|
558
|
+
})
|
|
559
|
+
}
|
|
649
560
|
|
|
650
|
-
|
|
651
|
-
|
|
561
|
+
describeServer(
|
|
562
|
+
params?: ComAtprotoServerDescribeServer.QueryParams,
|
|
563
|
+
opts?: ComAtprotoServerDescribeServer.CallOptions,
|
|
564
|
+
): Promise<ComAtprotoServerDescribeServer.Response> {
|
|
565
|
+
return this._service.xrpc
|
|
566
|
+
.call('com.atproto.server.describeServer', params, undefined, opts)
|
|
567
|
+
.catch((e) => {
|
|
568
|
+
throw ComAtprotoServerDescribeServer.toKnownErr(e)
|
|
569
|
+
})
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
getSession(
|
|
573
|
+
params?: ComAtprotoServerGetSession.QueryParams,
|
|
574
|
+
opts?: ComAtprotoServerGetSession.CallOptions,
|
|
575
|
+
): Promise<ComAtprotoServerGetSession.Response> {
|
|
576
|
+
return this._service.xrpc
|
|
577
|
+
.call('com.atproto.server.getSession', params, undefined, opts)
|
|
578
|
+
.catch((e) => {
|
|
579
|
+
throw ComAtprotoServerGetSession.toKnownErr(e)
|
|
580
|
+
})
|
|
652
581
|
}
|
|
653
582
|
|
|
654
|
-
|
|
655
|
-
data?:
|
|
656
|
-
opts?:
|
|
657
|
-
): Promise<
|
|
583
|
+
refreshSession(
|
|
584
|
+
data?: ComAtprotoServerRefreshSession.InputSchema,
|
|
585
|
+
opts?: ComAtprotoServerRefreshSession.CallOptions,
|
|
586
|
+
): Promise<ComAtprotoServerRefreshSession.Response> {
|
|
658
587
|
return this._service.xrpc
|
|
659
|
-
.call('com.atproto.
|
|
588
|
+
.call('com.atproto.server.refreshSession', opts?.qp, data, opts)
|
|
660
589
|
.catch((e) => {
|
|
661
|
-
throw
|
|
590
|
+
throw ComAtprotoServerRefreshSession.toKnownErr(e)
|
|
662
591
|
})
|
|
663
592
|
}
|
|
664
593
|
|
|
665
|
-
|
|
666
|
-
data?:
|
|
667
|
-
opts?:
|
|
668
|
-
): Promise<
|
|
594
|
+
requestAccountDelete(
|
|
595
|
+
data?: ComAtprotoServerRequestAccountDelete.InputSchema,
|
|
596
|
+
opts?: ComAtprotoServerRequestAccountDelete.CallOptions,
|
|
597
|
+
): Promise<ComAtprotoServerRequestAccountDelete.Response> {
|
|
669
598
|
return this._service.xrpc
|
|
670
|
-
.call('com.atproto.
|
|
599
|
+
.call('com.atproto.server.requestAccountDelete', opts?.qp, data, opts)
|
|
671
600
|
.catch((e) => {
|
|
672
|
-
throw
|
|
601
|
+
throw ComAtprotoServerRequestAccountDelete.toKnownErr(e)
|
|
673
602
|
})
|
|
674
603
|
}
|
|
675
604
|
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
opts?:
|
|
679
|
-
): Promise<
|
|
605
|
+
requestPasswordReset(
|
|
606
|
+
data?: ComAtprotoServerRequestPasswordReset.InputSchema,
|
|
607
|
+
opts?: ComAtprotoServerRequestPasswordReset.CallOptions,
|
|
608
|
+
): Promise<ComAtprotoServerRequestPasswordReset.Response> {
|
|
680
609
|
return this._service.xrpc
|
|
681
|
-
.call('com.atproto.
|
|
610
|
+
.call('com.atproto.server.requestPasswordReset', opts?.qp, data, opts)
|
|
682
611
|
.catch((e) => {
|
|
683
|
-
throw
|
|
612
|
+
throw ComAtprotoServerRequestPasswordReset.toKnownErr(e)
|
|
684
613
|
})
|
|
685
614
|
}
|
|
686
615
|
|
|
687
|
-
|
|
688
|
-
data?:
|
|
689
|
-
opts?:
|
|
690
|
-
): Promise<
|
|
616
|
+
resetPassword(
|
|
617
|
+
data?: ComAtprotoServerResetPassword.InputSchema,
|
|
618
|
+
opts?: ComAtprotoServerResetPassword.CallOptions,
|
|
619
|
+
): Promise<ComAtprotoServerResetPassword.Response> {
|
|
691
620
|
return this._service.xrpc
|
|
692
|
-
.call('com.atproto.
|
|
621
|
+
.call('com.atproto.server.resetPassword', opts?.qp, data, opts)
|
|
693
622
|
.catch((e) => {
|
|
694
|
-
throw
|
|
623
|
+
throw ComAtprotoServerResetPassword.toKnownErr(e)
|
|
695
624
|
})
|
|
696
625
|
}
|
|
697
626
|
}
|
|
@@ -703,6 +632,17 @@ export class SyncNS {
|
|
|
703
632
|
this._service = service
|
|
704
633
|
}
|
|
705
634
|
|
|
635
|
+
getBlob(
|
|
636
|
+
params?: ComAtprotoSyncGetBlob.QueryParams,
|
|
637
|
+
opts?: ComAtprotoSyncGetBlob.CallOptions,
|
|
638
|
+
): Promise<ComAtprotoSyncGetBlob.Response> {
|
|
639
|
+
return this._service.xrpc
|
|
640
|
+
.call('com.atproto.sync.getBlob', params, undefined, opts)
|
|
641
|
+
.catch((e) => {
|
|
642
|
+
throw ComAtprotoSyncGetBlob.toKnownErr(e)
|
|
643
|
+
})
|
|
644
|
+
}
|
|
645
|
+
|
|
706
646
|
getBlocks(
|
|
707
647
|
params?: ComAtprotoSyncGetBlocks.QueryParams,
|
|
708
648
|
opts?: ComAtprotoSyncGetBlocks.CallOptions,
|
|
@@ -769,6 +709,17 @@ export class SyncNS {
|
|
|
769
709
|
})
|
|
770
710
|
}
|
|
771
711
|
|
|
712
|
+
listBlobs(
|
|
713
|
+
params?: ComAtprotoSyncListBlobs.QueryParams,
|
|
714
|
+
opts?: ComAtprotoSyncListBlobs.CallOptions,
|
|
715
|
+
): Promise<ComAtprotoSyncListBlobs.Response> {
|
|
716
|
+
return this._service.xrpc
|
|
717
|
+
.call('com.atproto.sync.listBlobs', params, undefined, opts)
|
|
718
|
+
.catch((e) => {
|
|
719
|
+
throw ComAtprotoSyncListBlobs.toKnownErr(e)
|
|
720
|
+
})
|
|
721
|
+
}
|
|
722
|
+
|
|
772
723
|
notifyOfUpdate(
|
|
773
724
|
params?: ComAtprotoSyncNotifyOfUpdate.QueryParams,
|
|
774
725
|
opts?: ComAtprotoSyncNotifyOfUpdate.CallOptions,
|
|
@@ -809,7 +760,8 @@ export class BskyNS {
|
|
|
809
760
|
feed: FeedNS
|
|
810
761
|
graph: GraphNS
|
|
811
762
|
notification: NotificationNS
|
|
812
|
-
|
|
763
|
+
richtext: RichtextNS
|
|
764
|
+
unspecced: UnspeccedNS
|
|
813
765
|
|
|
814
766
|
constructor(service: AtpServiceClient) {
|
|
815
767
|
this._service = service
|
|
@@ -818,7 +770,8 @@ export class BskyNS {
|
|
|
818
770
|
this.feed = new FeedNS(service)
|
|
819
771
|
this.graph = new GraphNS(service)
|
|
820
772
|
this.notification = new NotificationNS(service)
|
|
821
|
-
this.
|
|
773
|
+
this.richtext = new RichtextNS(service)
|
|
774
|
+
this.unspecced = new UnspeccedNS(service)
|
|
822
775
|
}
|
|
823
776
|
}
|
|
824
777
|
|
|
@@ -864,36 +817,25 @@ export class ActorNS {
|
|
|
864
817
|
})
|
|
865
818
|
}
|
|
866
819
|
|
|
867
|
-
|
|
868
|
-
params?:
|
|
869
|
-
opts?:
|
|
870
|
-
): Promise<
|
|
871
|
-
return this._service.xrpc
|
|
872
|
-
.call('app.bsky.actor.search', params, undefined, opts)
|
|
873
|
-
.catch((e) => {
|
|
874
|
-
throw AppBskyActorSearch.toKnownErr(e)
|
|
875
|
-
})
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
searchTypeahead(
|
|
879
|
-
params?: AppBskyActorSearchTypeahead.QueryParams,
|
|
880
|
-
opts?: AppBskyActorSearchTypeahead.CallOptions,
|
|
881
|
-
): Promise<AppBskyActorSearchTypeahead.Response> {
|
|
820
|
+
searchActors(
|
|
821
|
+
params?: AppBskyActorSearchActors.QueryParams,
|
|
822
|
+
opts?: AppBskyActorSearchActors.CallOptions,
|
|
823
|
+
): Promise<AppBskyActorSearchActors.Response> {
|
|
882
824
|
return this._service.xrpc
|
|
883
|
-
.call('app.bsky.actor.
|
|
825
|
+
.call('app.bsky.actor.searchActors', params, undefined, opts)
|
|
884
826
|
.catch((e) => {
|
|
885
|
-
throw
|
|
827
|
+
throw AppBskyActorSearchActors.toKnownErr(e)
|
|
886
828
|
})
|
|
887
829
|
}
|
|
888
830
|
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
opts?:
|
|
892
|
-
): Promise<
|
|
831
|
+
searchActorsTypeahead(
|
|
832
|
+
params?: AppBskyActorSearchActorsTypeahead.QueryParams,
|
|
833
|
+
opts?: AppBskyActorSearchActorsTypeahead.CallOptions,
|
|
834
|
+
): Promise<AppBskyActorSearchActorsTypeahead.Response> {
|
|
893
835
|
return this._service.xrpc
|
|
894
|
-
.call('app.bsky.actor.
|
|
836
|
+
.call('app.bsky.actor.searchActorsTypeahead', params, undefined, opts)
|
|
895
837
|
.catch((e) => {
|
|
896
|
-
throw
|
|
838
|
+
throw AppBskyActorSearchActorsTypeahead.toKnownErr(e)
|
|
897
839
|
})
|
|
898
840
|
}
|
|
899
841
|
}
|
|
@@ -940,7 +882,7 @@ export class ProfileRecord {
|
|
|
940
882
|
const res = await this._service.xrpc.call(
|
|
941
883
|
'com.atproto.repo.createRecord',
|
|
942
884
|
undefined,
|
|
943
|
-
{ collection: 'app.bsky.actor.profile', ...params, record },
|
|
885
|
+
{ collection: 'app.bsky.actor.profile', rkey: 'self', ...params, record },
|
|
944
886
|
{ encoding: 'application/json', headers },
|
|
945
887
|
)
|
|
946
888
|
return res.data
|
|
@@ -969,15 +911,15 @@ export class EmbedNS {
|
|
|
969
911
|
|
|
970
912
|
export class FeedNS {
|
|
971
913
|
_service: AtpServiceClient
|
|
914
|
+
like: LikeRecord
|
|
972
915
|
post: PostRecord
|
|
973
916
|
repost: RepostRecord
|
|
974
|
-
vote: VoteRecord
|
|
975
917
|
|
|
976
918
|
constructor(service: AtpServiceClient) {
|
|
977
919
|
this._service = service
|
|
920
|
+
this.like = new LikeRecord(service)
|
|
978
921
|
this.post = new PostRecord(service)
|
|
979
922
|
this.repost = new RepostRecord(service)
|
|
980
|
-
this.vote = new VoteRecord(service)
|
|
981
923
|
}
|
|
982
924
|
|
|
983
925
|
getAuthorFeed(
|
|
@@ -991,6 +933,17 @@ export class FeedNS {
|
|
|
991
933
|
})
|
|
992
934
|
}
|
|
993
935
|
|
|
936
|
+
getLikes(
|
|
937
|
+
params?: AppBskyFeedGetLikes.QueryParams,
|
|
938
|
+
opts?: AppBskyFeedGetLikes.CallOptions,
|
|
939
|
+
): Promise<AppBskyFeedGetLikes.Response> {
|
|
940
|
+
return this._service.xrpc
|
|
941
|
+
.call('app.bsky.feed.getLikes', params, undefined, opts)
|
|
942
|
+
.catch((e) => {
|
|
943
|
+
throw AppBskyFeedGetLikes.toKnownErr(e)
|
|
944
|
+
})
|
|
945
|
+
}
|
|
946
|
+
|
|
994
947
|
getPostThread(
|
|
995
948
|
params?: AppBskyFeedGetPostThread.QueryParams,
|
|
996
949
|
opts?: AppBskyFeedGetPostThread.CallOptions,
|
|
@@ -1023,31 +976,9 @@ export class FeedNS {
|
|
|
1023
976
|
throw AppBskyFeedGetTimeline.toKnownErr(e)
|
|
1024
977
|
})
|
|
1025
978
|
}
|
|
1026
|
-
|
|
1027
|
-
getVotes(
|
|
1028
|
-
params?: AppBskyFeedGetVotes.QueryParams,
|
|
1029
|
-
opts?: AppBskyFeedGetVotes.CallOptions,
|
|
1030
|
-
): Promise<AppBskyFeedGetVotes.Response> {
|
|
1031
|
-
return this._service.xrpc
|
|
1032
|
-
.call('app.bsky.feed.getVotes', params, undefined, opts)
|
|
1033
|
-
.catch((e) => {
|
|
1034
|
-
throw AppBskyFeedGetVotes.toKnownErr(e)
|
|
1035
|
-
})
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
setVote(
|
|
1039
|
-
data?: AppBskyFeedSetVote.InputSchema,
|
|
1040
|
-
opts?: AppBskyFeedSetVote.CallOptions,
|
|
1041
|
-
): Promise<AppBskyFeedSetVote.Response> {
|
|
1042
|
-
return this._service.xrpc
|
|
1043
|
-
.call('app.bsky.feed.setVote', opts?.qp, data, opts)
|
|
1044
|
-
.catch((e) => {
|
|
1045
|
-
throw AppBskyFeedSetVote.toKnownErr(e)
|
|
1046
|
-
})
|
|
1047
|
-
}
|
|
1048
979
|
}
|
|
1049
980
|
|
|
1050
|
-
export class
|
|
981
|
+
export class LikeRecord {
|
|
1051
982
|
_service: AtpServiceClient
|
|
1052
983
|
|
|
1053
984
|
constructor(service: AtpServiceClient) {
|
|
@@ -1058,10 +989,10 @@ export class PostRecord {
|
|
|
1058
989
|
params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
|
|
1059
990
|
): Promise<{
|
|
1060
991
|
cursor?: string
|
|
1061
|
-
records: { uri: string; value:
|
|
992
|
+
records: { uri: string; value: AppBskyFeedLike.Record }[]
|
|
1062
993
|
}> {
|
|
1063
994
|
const res = await this._service.xrpc.call('com.atproto.repo.listRecords', {
|
|
1064
|
-
collection: 'app.bsky.feed.
|
|
995
|
+
collection: 'app.bsky.feed.like',
|
|
1065
996
|
...params,
|
|
1066
997
|
})
|
|
1067
998
|
return res.data
|
|
@@ -1069,9 +1000,9 @@ export class PostRecord {
|
|
|
1069
1000
|
|
|
1070
1001
|
async get(
|
|
1071
1002
|
params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
|
|
1072
|
-
): Promise<{ uri: string; cid: string; value:
|
|
1003
|
+
): Promise<{ uri: string; cid: string; value: AppBskyFeedLike.Record }> {
|
|
1073
1004
|
const res = await this._service.xrpc.call('com.atproto.repo.getRecord', {
|
|
1074
|
-
collection: 'app.bsky.feed.
|
|
1005
|
+
collection: 'app.bsky.feed.like',
|
|
1075
1006
|
...params,
|
|
1076
1007
|
})
|
|
1077
1008
|
return res.data
|
|
@@ -1082,14 +1013,14 @@ export class PostRecord {
|
|
|
1082
1013
|
ComAtprotoRepoCreateRecord.InputSchema,
|
|
1083
1014
|
'collection' | 'record'
|
|
1084
1015
|
>,
|
|
1085
|
-
record:
|
|
1016
|
+
record: AppBskyFeedLike.Record,
|
|
1086
1017
|
headers?: Record<string, string>,
|
|
1087
1018
|
): Promise<{ uri: string; cid: string }> {
|
|
1088
|
-
record.$type = 'app.bsky.feed.
|
|
1019
|
+
record.$type = 'app.bsky.feed.like'
|
|
1089
1020
|
const res = await this._service.xrpc.call(
|
|
1090
1021
|
'com.atproto.repo.createRecord',
|
|
1091
1022
|
undefined,
|
|
1092
|
-
{ collection: 'app.bsky.feed.
|
|
1023
|
+
{ collection: 'app.bsky.feed.like', ...params, record },
|
|
1093
1024
|
{ encoding: 'application/json', headers },
|
|
1094
1025
|
)
|
|
1095
1026
|
return res.data
|
|
@@ -1102,13 +1033,13 @@ export class PostRecord {
|
|
|
1102
1033
|
await this._service.xrpc.call(
|
|
1103
1034
|
'com.atproto.repo.deleteRecord',
|
|
1104
1035
|
undefined,
|
|
1105
|
-
{ collection: 'app.bsky.feed.
|
|
1036
|
+
{ collection: 'app.bsky.feed.like', ...params },
|
|
1106
1037
|
{ headers },
|
|
1107
1038
|
)
|
|
1108
1039
|
}
|
|
1109
1040
|
}
|
|
1110
1041
|
|
|
1111
|
-
export class
|
|
1042
|
+
export class PostRecord {
|
|
1112
1043
|
_service: AtpServiceClient
|
|
1113
1044
|
|
|
1114
1045
|
constructor(service: AtpServiceClient) {
|
|
@@ -1119,10 +1050,10 @@ export class RepostRecord {
|
|
|
1119
1050
|
params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
|
|
1120
1051
|
): Promise<{
|
|
1121
1052
|
cursor?: string
|
|
1122
|
-
records: { uri: string; value:
|
|
1053
|
+
records: { uri: string; value: AppBskyFeedPost.Record }[]
|
|
1123
1054
|
}> {
|
|
1124
1055
|
const res = await this._service.xrpc.call('com.atproto.repo.listRecords', {
|
|
1125
|
-
collection: 'app.bsky.feed.
|
|
1056
|
+
collection: 'app.bsky.feed.post',
|
|
1126
1057
|
...params,
|
|
1127
1058
|
})
|
|
1128
1059
|
return res.data
|
|
@@ -1130,9 +1061,9 @@ export class RepostRecord {
|
|
|
1130
1061
|
|
|
1131
1062
|
async get(
|
|
1132
1063
|
params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
|
|
1133
|
-
): Promise<{ uri: string; cid: string; value:
|
|
1064
|
+
): Promise<{ uri: string; cid: string; value: AppBskyFeedPost.Record }> {
|
|
1134
1065
|
const res = await this._service.xrpc.call('com.atproto.repo.getRecord', {
|
|
1135
|
-
collection: 'app.bsky.feed.
|
|
1066
|
+
collection: 'app.bsky.feed.post',
|
|
1136
1067
|
...params,
|
|
1137
1068
|
})
|
|
1138
1069
|
return res.data
|
|
@@ -1143,14 +1074,14 @@ export class RepostRecord {
|
|
|
1143
1074
|
ComAtprotoRepoCreateRecord.InputSchema,
|
|
1144
1075
|
'collection' | 'record'
|
|
1145
1076
|
>,
|
|
1146
|
-
record:
|
|
1077
|
+
record: AppBskyFeedPost.Record,
|
|
1147
1078
|
headers?: Record<string, string>,
|
|
1148
1079
|
): Promise<{ uri: string; cid: string }> {
|
|
1149
|
-
record.$type = 'app.bsky.feed.
|
|
1080
|
+
record.$type = 'app.bsky.feed.post'
|
|
1150
1081
|
const res = await this._service.xrpc.call(
|
|
1151
1082
|
'com.atproto.repo.createRecord',
|
|
1152
1083
|
undefined,
|
|
1153
|
-
{ collection: 'app.bsky.feed.
|
|
1084
|
+
{ collection: 'app.bsky.feed.post', ...params, record },
|
|
1154
1085
|
{ encoding: 'application/json', headers },
|
|
1155
1086
|
)
|
|
1156
1087
|
return res.data
|
|
@@ -1163,13 +1094,13 @@ export class RepostRecord {
|
|
|
1163
1094
|
await this._service.xrpc.call(
|
|
1164
1095
|
'com.atproto.repo.deleteRecord',
|
|
1165
1096
|
undefined,
|
|
1166
|
-
{ collection: 'app.bsky.feed.
|
|
1097
|
+
{ collection: 'app.bsky.feed.post', ...params },
|
|
1167
1098
|
{ headers },
|
|
1168
1099
|
)
|
|
1169
1100
|
}
|
|
1170
1101
|
}
|
|
1171
1102
|
|
|
1172
|
-
export class
|
|
1103
|
+
export class RepostRecord {
|
|
1173
1104
|
_service: AtpServiceClient
|
|
1174
1105
|
|
|
1175
1106
|
constructor(service: AtpServiceClient) {
|
|
@@ -1180,10 +1111,10 @@ export class VoteRecord {
|
|
|
1180
1111
|
params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
|
|
1181
1112
|
): Promise<{
|
|
1182
1113
|
cursor?: string
|
|
1183
|
-
records: { uri: string; value:
|
|
1114
|
+
records: { uri: string; value: AppBskyFeedRepost.Record }[]
|
|
1184
1115
|
}> {
|
|
1185
1116
|
const res = await this._service.xrpc.call('com.atproto.repo.listRecords', {
|
|
1186
|
-
collection: 'app.bsky.feed.
|
|
1117
|
+
collection: 'app.bsky.feed.repost',
|
|
1187
1118
|
...params,
|
|
1188
1119
|
})
|
|
1189
1120
|
return res.data
|
|
@@ -1191,9 +1122,9 @@ export class VoteRecord {
|
|
|
1191
1122
|
|
|
1192
1123
|
async get(
|
|
1193
1124
|
params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
|
|
1194
|
-
): Promise<{ uri: string; cid: string; value:
|
|
1125
|
+
): Promise<{ uri: string; cid: string; value: AppBskyFeedRepost.Record }> {
|
|
1195
1126
|
const res = await this._service.xrpc.call('com.atproto.repo.getRecord', {
|
|
1196
|
-
collection: 'app.bsky.feed.
|
|
1127
|
+
collection: 'app.bsky.feed.repost',
|
|
1197
1128
|
...params,
|
|
1198
1129
|
})
|
|
1199
1130
|
return res.data
|
|
@@ -1204,14 +1135,14 @@ export class VoteRecord {
|
|
|
1204
1135
|
ComAtprotoRepoCreateRecord.InputSchema,
|
|
1205
1136
|
'collection' | 'record'
|
|
1206
1137
|
>,
|
|
1207
|
-
record:
|
|
1138
|
+
record: AppBskyFeedRepost.Record,
|
|
1208
1139
|
headers?: Record<string, string>,
|
|
1209
1140
|
): Promise<{ uri: string; cid: string }> {
|
|
1210
|
-
record.$type = 'app.bsky.feed.
|
|
1141
|
+
record.$type = 'app.bsky.feed.repost'
|
|
1211
1142
|
const res = await this._service.xrpc.call(
|
|
1212
1143
|
'com.atproto.repo.createRecord',
|
|
1213
1144
|
undefined,
|
|
1214
|
-
{ collection: 'app.bsky.feed.
|
|
1145
|
+
{ collection: 'app.bsky.feed.repost', ...params, record },
|
|
1215
1146
|
{ encoding: 'application/json', headers },
|
|
1216
1147
|
)
|
|
1217
1148
|
return res.data
|
|
@@ -1224,7 +1155,7 @@ export class VoteRecord {
|
|
|
1224
1155
|
await this._service.xrpc.call(
|
|
1225
1156
|
'com.atproto.repo.deleteRecord',
|
|
1226
1157
|
undefined,
|
|
1227
|
-
{ collection: 'app.bsky.feed.
|
|
1158
|
+
{ collection: 'app.bsky.feed.repost', ...params },
|
|
1228
1159
|
{ headers },
|
|
1229
1160
|
)
|
|
1230
1161
|
}
|
|
@@ -1232,14 +1163,10 @@ export class VoteRecord {
|
|
|
1232
1163
|
|
|
1233
1164
|
export class GraphNS {
|
|
1234
1165
|
_service: AtpServiceClient
|
|
1235
|
-
assertion: AssertionRecord
|
|
1236
|
-
confirmation: ConfirmationRecord
|
|
1237
1166
|
follow: FollowRecord
|
|
1238
1167
|
|
|
1239
1168
|
constructor(service: AtpServiceClient) {
|
|
1240
1169
|
this._service = service
|
|
1241
|
-
this.assertion = new AssertionRecord(service)
|
|
1242
|
-
this.confirmation = new ConfirmationRecord(service)
|
|
1243
1170
|
this.follow = new FollowRecord(service)
|
|
1244
1171
|
}
|
|
1245
1172
|
|
|
@@ -1276,159 +1203,29 @@ export class GraphNS {
|
|
|
1276
1203
|
})
|
|
1277
1204
|
}
|
|
1278
1205
|
|
|
1279
|
-
|
|
1280
|
-
data?:
|
|
1281
|
-
opts?:
|
|
1282
|
-
): Promise<
|
|
1206
|
+
muteActor(
|
|
1207
|
+
data?: AppBskyGraphMuteActor.InputSchema,
|
|
1208
|
+
opts?: AppBskyGraphMuteActor.CallOptions,
|
|
1209
|
+
): Promise<AppBskyGraphMuteActor.Response> {
|
|
1283
1210
|
return this._service.xrpc
|
|
1284
|
-
.call('app.bsky.graph.
|
|
1211
|
+
.call('app.bsky.graph.muteActor', opts?.qp, data, opts)
|
|
1285
1212
|
.catch((e) => {
|
|
1286
|
-
throw
|
|
1213
|
+
throw AppBskyGraphMuteActor.toKnownErr(e)
|
|
1287
1214
|
})
|
|
1288
1215
|
}
|
|
1289
1216
|
|
|
1290
|
-
|
|
1291
|
-
data?:
|
|
1292
|
-
opts?:
|
|
1293
|
-
): Promise<
|
|
1217
|
+
unmuteActor(
|
|
1218
|
+
data?: AppBskyGraphUnmuteActor.InputSchema,
|
|
1219
|
+
opts?: AppBskyGraphUnmuteActor.CallOptions,
|
|
1220
|
+
): Promise<AppBskyGraphUnmuteActor.Response> {
|
|
1294
1221
|
return this._service.xrpc
|
|
1295
|
-
.call('app.bsky.graph.
|
|
1222
|
+
.call('app.bsky.graph.unmuteActor', opts?.qp, data, opts)
|
|
1296
1223
|
.catch((e) => {
|
|
1297
|
-
throw
|
|
1224
|
+
throw AppBskyGraphUnmuteActor.toKnownErr(e)
|
|
1298
1225
|
})
|
|
1299
1226
|
}
|
|
1300
1227
|
}
|
|
1301
1228
|
|
|
1302
|
-
export class AssertionRecord {
|
|
1303
|
-
_service: AtpServiceClient
|
|
1304
|
-
|
|
1305
|
-
constructor(service: AtpServiceClient) {
|
|
1306
|
-
this._service = service
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
async list(
|
|
1310
|
-
params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
|
|
1311
|
-
): Promise<{
|
|
1312
|
-
cursor?: string
|
|
1313
|
-
records: { uri: string; value: AppBskyGraphAssertion.Record }[]
|
|
1314
|
-
}> {
|
|
1315
|
-
const res = await this._service.xrpc.call('com.atproto.repo.listRecords', {
|
|
1316
|
-
collection: 'app.bsky.graph.assertion',
|
|
1317
|
-
...params,
|
|
1318
|
-
})
|
|
1319
|
-
return res.data
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
async get(
|
|
1323
|
-
params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
|
|
1324
|
-
): Promise<{
|
|
1325
|
-
uri: string
|
|
1326
|
-
cid: string
|
|
1327
|
-
value: AppBskyGraphAssertion.Record
|
|
1328
|
-
}> {
|
|
1329
|
-
const res = await this._service.xrpc.call('com.atproto.repo.getRecord', {
|
|
1330
|
-
collection: 'app.bsky.graph.assertion',
|
|
1331
|
-
...params,
|
|
1332
|
-
})
|
|
1333
|
-
return res.data
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
async create(
|
|
1337
|
-
params: Omit<
|
|
1338
|
-
ComAtprotoRepoCreateRecord.InputSchema,
|
|
1339
|
-
'collection' | 'record'
|
|
1340
|
-
>,
|
|
1341
|
-
record: AppBskyGraphAssertion.Record,
|
|
1342
|
-
headers?: Record<string, string>,
|
|
1343
|
-
): Promise<{ uri: string; cid: string }> {
|
|
1344
|
-
record.$type = 'app.bsky.graph.assertion'
|
|
1345
|
-
const res = await this._service.xrpc.call(
|
|
1346
|
-
'com.atproto.repo.createRecord',
|
|
1347
|
-
undefined,
|
|
1348
|
-
{ collection: 'app.bsky.graph.assertion', ...params, record },
|
|
1349
|
-
{ encoding: 'application/json', headers },
|
|
1350
|
-
)
|
|
1351
|
-
return res.data
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
async delete(
|
|
1355
|
-
params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
|
|
1356
|
-
headers?: Record<string, string>,
|
|
1357
|
-
): Promise<void> {
|
|
1358
|
-
await this._service.xrpc.call(
|
|
1359
|
-
'com.atproto.repo.deleteRecord',
|
|
1360
|
-
undefined,
|
|
1361
|
-
{ collection: 'app.bsky.graph.assertion', ...params },
|
|
1362
|
-
{ headers },
|
|
1363
|
-
)
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
export class ConfirmationRecord {
|
|
1368
|
-
_service: AtpServiceClient
|
|
1369
|
-
|
|
1370
|
-
constructor(service: AtpServiceClient) {
|
|
1371
|
-
this._service = service
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
async list(
|
|
1375
|
-
params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
|
|
1376
|
-
): Promise<{
|
|
1377
|
-
cursor?: string
|
|
1378
|
-
records: { uri: string; value: AppBskyGraphConfirmation.Record }[]
|
|
1379
|
-
}> {
|
|
1380
|
-
const res = await this._service.xrpc.call('com.atproto.repo.listRecords', {
|
|
1381
|
-
collection: 'app.bsky.graph.confirmation',
|
|
1382
|
-
...params,
|
|
1383
|
-
})
|
|
1384
|
-
return res.data
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
async get(
|
|
1388
|
-
params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
|
|
1389
|
-
): Promise<{
|
|
1390
|
-
uri: string
|
|
1391
|
-
cid: string
|
|
1392
|
-
value: AppBskyGraphConfirmation.Record
|
|
1393
|
-
}> {
|
|
1394
|
-
const res = await this._service.xrpc.call('com.atproto.repo.getRecord', {
|
|
1395
|
-
collection: 'app.bsky.graph.confirmation',
|
|
1396
|
-
...params,
|
|
1397
|
-
})
|
|
1398
|
-
return res.data
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
async create(
|
|
1402
|
-
params: Omit<
|
|
1403
|
-
ComAtprotoRepoCreateRecord.InputSchema,
|
|
1404
|
-
'collection' | 'record'
|
|
1405
|
-
>,
|
|
1406
|
-
record: AppBskyGraphConfirmation.Record,
|
|
1407
|
-
headers?: Record<string, string>,
|
|
1408
|
-
): Promise<{ uri: string; cid: string }> {
|
|
1409
|
-
record.$type = 'app.bsky.graph.confirmation'
|
|
1410
|
-
const res = await this._service.xrpc.call(
|
|
1411
|
-
'com.atproto.repo.createRecord',
|
|
1412
|
-
undefined,
|
|
1413
|
-
{ collection: 'app.bsky.graph.confirmation', ...params, record },
|
|
1414
|
-
{ encoding: 'application/json', headers },
|
|
1415
|
-
)
|
|
1416
|
-
return res.data
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
async delete(
|
|
1420
|
-
params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
|
|
1421
|
-
headers?: Record<string, string>,
|
|
1422
|
-
): Promise<void> {
|
|
1423
|
-
await this._service.xrpc.call(
|
|
1424
|
-
'com.atproto.repo.deleteRecord',
|
|
1425
|
-
undefined,
|
|
1426
|
-
{ collection: 'app.bsky.graph.confirmation', ...params },
|
|
1427
|
-
{ headers },
|
|
1428
|
-
)
|
|
1429
|
-
}
|
|
1430
|
-
}
|
|
1431
|
-
|
|
1432
1229
|
export class FollowRecord {
|
|
1433
1230
|
_service: AtpServiceClient
|
|
1434
1231
|
|
|
@@ -1497,25 +1294,25 @@ export class NotificationNS {
|
|
|
1497
1294
|
this._service = service
|
|
1498
1295
|
}
|
|
1499
1296
|
|
|
1500
|
-
|
|
1501
|
-
params?:
|
|
1502
|
-
opts?:
|
|
1503
|
-
): Promise<
|
|
1297
|
+
getUnreadCount(
|
|
1298
|
+
params?: AppBskyNotificationGetUnreadCount.QueryParams,
|
|
1299
|
+
opts?: AppBskyNotificationGetUnreadCount.CallOptions,
|
|
1300
|
+
): Promise<AppBskyNotificationGetUnreadCount.Response> {
|
|
1504
1301
|
return this._service.xrpc
|
|
1505
|
-
.call('app.bsky.notification.
|
|
1302
|
+
.call('app.bsky.notification.getUnreadCount', params, undefined, opts)
|
|
1506
1303
|
.catch((e) => {
|
|
1507
|
-
throw
|
|
1304
|
+
throw AppBskyNotificationGetUnreadCount.toKnownErr(e)
|
|
1508
1305
|
})
|
|
1509
1306
|
}
|
|
1510
1307
|
|
|
1511
|
-
|
|
1512
|
-
params?:
|
|
1513
|
-
opts?:
|
|
1514
|
-
): Promise<
|
|
1308
|
+
listNotifications(
|
|
1309
|
+
params?: AppBskyNotificationListNotifications.QueryParams,
|
|
1310
|
+
opts?: AppBskyNotificationListNotifications.CallOptions,
|
|
1311
|
+
): Promise<AppBskyNotificationListNotifications.Response> {
|
|
1515
1312
|
return this._service.xrpc
|
|
1516
|
-
.call('app.bsky.notification.
|
|
1313
|
+
.call('app.bsky.notification.listNotifications', params, undefined, opts)
|
|
1517
1314
|
.catch((e) => {
|
|
1518
|
-
throw
|
|
1315
|
+
throw AppBskyNotificationListNotifications.toKnownErr(e)
|
|
1519
1316
|
})
|
|
1520
1317
|
}
|
|
1521
1318
|
|
|
@@ -1531,77 +1328,29 @@ export class NotificationNS {
|
|
|
1531
1328
|
}
|
|
1532
1329
|
}
|
|
1533
1330
|
|
|
1534
|
-
export class
|
|
1331
|
+
export class RichtextNS {
|
|
1535
1332
|
_service: AtpServiceClient
|
|
1536
|
-
declaration: DeclarationRecord
|
|
1537
1333
|
|
|
1538
1334
|
constructor(service: AtpServiceClient) {
|
|
1539
1335
|
this._service = service
|
|
1540
|
-
this.declaration = new DeclarationRecord(service)
|
|
1541
1336
|
}
|
|
1542
1337
|
}
|
|
1543
1338
|
|
|
1544
|
-
export class
|
|
1339
|
+
export class UnspeccedNS {
|
|
1545
1340
|
_service: AtpServiceClient
|
|
1546
1341
|
|
|
1547
1342
|
constructor(service: AtpServiceClient) {
|
|
1548
1343
|
this._service = service
|
|
1549
1344
|
}
|
|
1550
1345
|
|
|
1551
|
-
|
|
1552
|
-
params
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
})
|
|
1561
|
-
return res.data
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
async get(
|
|
1565
|
-
params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
|
|
1566
|
-
): Promise<{
|
|
1567
|
-
uri: string
|
|
1568
|
-
cid: string
|
|
1569
|
-
value: AppBskySystemDeclaration.Record
|
|
1570
|
-
}> {
|
|
1571
|
-
const res = await this._service.xrpc.call('com.atproto.repo.getRecord', {
|
|
1572
|
-
collection: 'app.bsky.system.declaration',
|
|
1573
|
-
...params,
|
|
1574
|
-
})
|
|
1575
|
-
return res.data
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
async create(
|
|
1579
|
-
params: Omit<
|
|
1580
|
-
ComAtprotoRepoCreateRecord.InputSchema,
|
|
1581
|
-
'collection' | 'record'
|
|
1582
|
-
>,
|
|
1583
|
-
record: AppBskySystemDeclaration.Record,
|
|
1584
|
-
headers?: Record<string, string>,
|
|
1585
|
-
): Promise<{ uri: string; cid: string }> {
|
|
1586
|
-
record.$type = 'app.bsky.system.declaration'
|
|
1587
|
-
const res = await this._service.xrpc.call(
|
|
1588
|
-
'com.atproto.repo.createRecord',
|
|
1589
|
-
undefined,
|
|
1590
|
-
{ collection: 'app.bsky.system.declaration', ...params, record },
|
|
1591
|
-
{ encoding: 'application/json', headers },
|
|
1592
|
-
)
|
|
1593
|
-
return res.data
|
|
1594
|
-
}
|
|
1595
|
-
|
|
1596
|
-
async delete(
|
|
1597
|
-
params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
|
|
1598
|
-
headers?: Record<string, string>,
|
|
1599
|
-
): Promise<void> {
|
|
1600
|
-
await this._service.xrpc.call(
|
|
1601
|
-
'com.atproto.repo.deleteRecord',
|
|
1602
|
-
undefined,
|
|
1603
|
-
{ collection: 'app.bsky.system.declaration', ...params },
|
|
1604
|
-
{ headers },
|
|
1605
|
-
)
|
|
1346
|
+
getPopular(
|
|
1347
|
+
params?: AppBskyUnspeccedGetPopular.QueryParams,
|
|
1348
|
+
opts?: AppBskyUnspeccedGetPopular.CallOptions,
|
|
1349
|
+
): Promise<AppBskyUnspeccedGetPopular.Response> {
|
|
1350
|
+
return this._service.xrpc
|
|
1351
|
+
.call('app.bsky.unspecced.getPopular', params, undefined, opts)
|
|
1352
|
+
.catch((e) => {
|
|
1353
|
+
throw AppBskyUnspeccedGetPopular.toKnownErr(e)
|
|
1354
|
+
})
|
|
1606
1355
|
}
|
|
1607
1356
|
}
|