@atproto/api 0.2.6 → 0.2.8

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.
Files changed (159) hide show
  1. package/README.md +4 -4
  2. package/dist/agent.d.ts +27 -0
  3. package/dist/bsky-agent.d.ts +43 -0
  4. package/dist/client/index.d.ts +16 -0
  5. package/dist/client/lexicons.d.ts +207 -2
  6. package/dist/client/types/app/bsky/actor/createScene.d.ts +32 -0
  7. package/dist/client/types/app/bsky/actor/getProfile.d.ts +16 -0
  8. package/dist/client/types/app/bsky/actor/getProfiles.d.ts +19 -0
  9. package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +21 -0
  10. package/dist/client/types/app/bsky/actor/profile.d.ts +10 -0
  11. package/dist/client/types/app/bsky/actor/ref.d.ts +28 -0
  12. package/dist/client/types/app/bsky/actor/search.d.ts +22 -0
  13. package/dist/client/types/app/bsky/actor/searchActors.d.ts +22 -0
  14. package/dist/client/types/app/bsky/actor/searchActorsTypeahead.d.ts +20 -0
  15. package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +20 -0
  16. package/dist/client/types/app/bsky/actor/updateProfile.d.ts +40 -0
  17. package/dist/client/types/app/bsky/embed/external.d.ts +31 -0
  18. package/dist/client/types/app/bsky/embed/images.d.ts +28 -0
  19. package/dist/client/types/app/bsky/embed/record.d.ts +41 -0
  20. package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts +24 -0
  21. package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +28 -0
  22. package/dist/client/types/app/bsky/feed/getAuthorFeed.d.ts +22 -0
  23. package/dist/client/types/app/bsky/feed/getLikes.d.ts +34 -0
  24. package/dist/client/types/app/bsky/feed/getPostThread.d.ts +26 -0
  25. package/dist/client/types/app/bsky/feed/getRepostedBy.d.ts +25 -0
  26. package/dist/client/types/app/bsky/feed/getTimeline.d.ts +22 -0
  27. package/dist/client/types/app/bsky/feed/getVotes.d.ts +36 -0
  28. package/dist/client/types/app/bsky/feed/like.d.ts +9 -0
  29. package/dist/client/types/app/bsky/feed/post.d.ts +43 -0
  30. package/dist/client/types/app/bsky/feed/repost.d.ts +9 -0
  31. package/dist/client/types/app/bsky/feed/setVote.d.ts +25 -0
  32. package/dist/client/types/app/bsky/feed/trend.d.ts +9 -0
  33. package/dist/client/types/app/bsky/feed/vote.d.ts +10 -0
  34. package/dist/client/types/app/bsky/graph/assertCreator.d.ts +1 -0
  35. package/dist/client/types/app/bsky/graph/assertMember.d.ts +1 -0
  36. package/dist/client/types/app/bsky/graph/assertion.d.ts +10 -0
  37. package/dist/client/types/app/bsky/graph/confirmation.d.ts +11 -0
  38. package/dist/client/types/app/bsky/graph/follow.d.ts +8 -0
  39. package/dist/client/types/app/bsky/graph/getAssertions.d.ts +48 -0
  40. package/dist/client/types/app/bsky/graph/getFollowers.d.ts +23 -0
  41. package/dist/client/types/app/bsky/graph/getFollows.d.ts +23 -0
  42. package/dist/client/types/app/bsky/graph/getMembers.d.ts +36 -0
  43. package/dist/client/types/app/bsky/graph/getMemberships.d.ts +36 -0
  44. package/dist/client/types/app/bsky/graph/getMutes.d.ts +21 -0
  45. package/dist/client/types/app/bsky/graph/mute.d.ts +17 -0
  46. package/dist/client/types/app/bsky/graph/muteActor.d.ts +17 -0
  47. package/dist/client/types/app/bsky/graph/unmute.d.ts +17 -0
  48. package/dist/client/types/app/bsky/graph/unmuteActor.d.ts +17 -0
  49. package/dist/client/types/app/bsky/notification/getCount.d.ts +17 -0
  50. package/dist/client/types/app/bsky/notification/getUnreadCount.d.ts +18 -0
  51. package/dist/client/types/app/bsky/notification/list.d.ts +35 -0
  52. package/dist/client/types/app/bsky/notification/listNotifications.d.ts +1 -0
  53. package/dist/client/types/app/bsky/notification/updateSeen.d.ts +17 -0
  54. package/dist/client/types/app/bsky/richtext/facet.d.ts +30 -0
  55. package/dist/client/types/app/bsky/system/actorScene.d.ts +1 -0
  56. package/dist/client/types/app/bsky/system/actorUser.d.ts +1 -0
  57. package/dist/client/types/app/bsky/system/declRef.d.ts +8 -0
  58. package/dist/client/types/app/bsky/system/declaration.d.ts +7 -0
  59. package/dist/client/types/app/bsky/unspecced/getPopular.d.ts +21 -0
  60. package/dist/client/types/com/atproto/account/create.d.ts +41 -0
  61. package/dist/client/types/com/atproto/account/createInviteCode.d.ts +22 -0
  62. package/dist/client/types/com/atproto/account/delete.d.ts +25 -0
  63. package/dist/client/types/com/atproto/account/get.d.ts +12 -0
  64. package/dist/client/types/com/atproto/account/requestDelete.d.ts +13 -0
  65. package/dist/client/types/com/atproto/account/requestPasswordReset.d.ts +17 -0
  66. package/dist/client/types/com/atproto/account/resetPassword.d.ts +24 -0
  67. package/dist/client/types/com/atproto/admin/blob.d.ts +37 -0
  68. package/dist/client/types/com/atproto/admin/defs.d.ts +3 -0
  69. package/dist/client/types/com/atproto/admin/getModerationAction.d.ts +16 -0
  70. package/dist/client/types/com/atproto/admin/getModerationActions.d.ts +22 -0
  71. package/dist/client/types/com/atproto/admin/getModerationReport.d.ts +16 -0
  72. package/dist/client/types/com/atproto/admin/getModerationReports.d.ts +23 -0
  73. package/dist/client/types/com/atproto/admin/getRecord.d.ts +17 -0
  74. package/dist/client/types/com/atproto/admin/getRepo.d.ts +16 -0
  75. package/dist/client/types/com/atproto/admin/moderationAction.d.ts +60 -0
  76. package/dist/client/types/com/atproto/admin/moderationReport.d.ts +37 -0
  77. package/dist/client/types/com/atproto/admin/record.d.ts +43 -0
  78. package/dist/client/types/com/atproto/admin/repo.d.ts +45 -0
  79. package/dist/client/types/com/atproto/admin/resolveModerationReports.d.ts +22 -0
  80. package/dist/client/types/com/atproto/admin/reverseModerationAction.d.ts +22 -0
  81. package/dist/client/types/com/atproto/admin/updateAccountEmail.d.ts +18 -0
  82. package/dist/client/types/com/atproto/blob/upload.d.ts +19 -0
  83. package/dist/client/types/com/atproto/handle/resolve.d.ts +18 -0
  84. package/dist/client/types/com/atproto/handle/update.d.ts +17 -0
  85. package/dist/client/types/com/atproto/identity/resolveHandle.d.ts +18 -0
  86. package/dist/client/types/com/atproto/identity/updateHandle.d.ts +17 -0
  87. package/dist/client/types/com/atproto/moderation/createReport.d.ts +38 -0
  88. package/dist/client/types/com/atproto/moderation/defs.d.ts +7 -0
  89. package/dist/client/types/com/atproto/repo/applyWrites.d.ts +47 -0
  90. package/dist/client/types/com/atproto/repo/batchWrite.d.ts +46 -0
  91. package/dist/client/types/com/atproto/repo/createRecord.d.ts +31 -0
  92. package/dist/client/types/com/atproto/repo/deleteRecord.d.ts +24 -0
  93. package/dist/client/types/com/atproto/repo/describe.d.ts +22 -0
  94. package/dist/client/types/com/atproto/repo/describeRepo.d.ts +22 -0
  95. package/dist/client/types/com/atproto/repo/getRecord.d.ts +23 -0
  96. package/dist/client/types/com/atproto/repo/putRecord.d.ts +32 -0
  97. package/dist/client/types/com/atproto/repo/recordRef.d.ts +8 -0
  98. package/dist/client/types/com/atproto/repo/repoRef.d.ts +7 -0
  99. package/dist/client/types/com/atproto/repo/strongRef.d.ts +8 -0
  100. package/dist/client/types/com/atproto/repo/uploadBlob.d.ts +20 -0
  101. package/dist/client/types/com/atproto/report/create.d.ts +39 -0
  102. package/dist/client/types/com/atproto/report/reasonType.d.ts +3 -0
  103. package/dist/client/types/com/atproto/report/subject.d.ts +23 -0
  104. package/dist/client/types/com/atproto/server/createAccount.d.ts +44 -0
  105. package/dist/client/types/com/atproto/server/createAppPassword.d.ts +31 -0
  106. package/dist/client/types/com/atproto/server/createInviteCodes.d.ts +10 -2
  107. package/dist/client/types/com/atproto/server/deleteAccount.d.ts +25 -0
  108. package/dist/client/types/com/atproto/server/deleteSession.d.ts +13 -0
  109. package/dist/client/types/com/atproto/server/describeServer.d.ts +27 -0
  110. package/dist/client/types/com/atproto/server/getAccountsConfig.d.ts +27 -0
  111. package/dist/client/types/com/atproto/server/listAppPasswords.d.ts +28 -0
  112. package/dist/client/types/com/atproto/server/refreshSession.d.ts +24 -0
  113. package/dist/client/types/com/atproto/server/requestAccountDelete.d.ts +13 -0
  114. package/dist/client/types/com/atproto/server/requestPasswordReset.d.ts +17 -0
  115. package/dist/client/types/com/atproto/server/resetPassword.d.ts +24 -0
  116. package/dist/client/types/com/atproto/server/revokeAppPassword.d.ts +17 -0
  117. package/dist/client/types/com/atproto/session/create.d.ts +29 -0
  118. package/dist/client/types/com/atproto/session/delete.d.ts +13 -0
  119. package/dist/client/types/com/atproto/session/get.d.ts +18 -0
  120. package/dist/client/types/com/atproto/session/refresh.d.ts +24 -0
  121. package/dist/client/types/com/atproto/sync/getBlob.d.ts +15 -0
  122. package/dist/client/types/com/atproto/sync/getBlocks.d.ts +15 -0
  123. package/dist/client/types/com/atproto/sync/getCheckout.d.ts +15 -0
  124. package/dist/client/types/com/atproto/sync/getCommitPath.d.ts +20 -0
  125. package/dist/client/types/com/atproto/sync/getHead.d.ts +18 -0
  126. package/dist/client/types/com/atproto/sync/getRecord.d.ts +17 -0
  127. package/dist/client/types/com/atproto/sync/getRepo.d.ts +16 -0
  128. package/dist/client/types/com/atproto/sync/getRoot.d.ts +18 -0
  129. package/dist/client/types/com/atproto/sync/listBlobs.d.ts +20 -0
  130. package/dist/client/types/com/atproto/sync/notifyOfUpdate.d.ts +13 -0
  131. package/dist/client/types/com/atproto/sync/requestCrawl.d.ts +13 -0
  132. package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +9 -0
  133. package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +58 -0
  134. package/dist/client/types/com/atproto/sync/updateRepo.d.ts +15 -0
  135. package/dist/client/util.d.ts +2 -0
  136. package/dist/helpers/bsky.d.ts +20 -0
  137. package/dist/index.d.ts +10 -0
  138. package/dist/index.js +517 -182
  139. package/dist/index.js.map +4 -4
  140. package/dist/mixins/bsky.d.ts +23 -0
  141. package/dist/rich-text/detection.d.ts +4 -0
  142. package/dist/rich-text/rich-text.d.ts +39 -0
  143. package/dist/rich-text/sanitization.d.ts +4 -0
  144. package/dist/rich-text/sanitize.d.ts +4 -0
  145. package/dist/rich-text/unicode.d.ts +11 -0
  146. package/dist/session.d.ts +42 -0
  147. package/package.json +1 -1
  148. package/src/client/index.ts +56 -0
  149. package/src/client/lexicons.ts +221 -7
  150. package/src/client/types/app/bsky/notification/getUnreadCount.ts +3 -1
  151. package/src/client/types/app/bsky/notification/listNotifications.ts +1 -0
  152. package/src/client/types/com/atproto/admin/defs.ts +3 -0
  153. package/src/client/types/com/atproto/admin/updateAccountEmail.ts +34 -0
  154. package/src/client/types/com/atproto/moderation/defs.ts +14 -2
  155. package/src/client/types/com/atproto/server/createAppPassword.ts +64 -0
  156. package/src/client/types/com/atproto/server/createInviteCodes.ts +23 -2
  157. package/src/client/types/com/atproto/server/listAppPasswords.ts +58 -0
  158. package/src/client/types/com/atproto/server/revokeAppPassword.ts +32 -0
  159. package/tsconfig.build.tsbuildinfo +1 -1
package/README.md CHANGED
@@ -33,7 +33,7 @@ Log into a server or create accounts using these APIs. You'll need an active ses
33
33
  import { BskyAgent, AtpSessionEvent, AtpSessionData } from '@atproto/api'
34
34
  const agent = new BskyAgent({
35
35
  service: 'https://example.com',
36
- persistSession: (evt: AtpSessionEvent, sess?: AtpSessionData) {
36
+ persistSession: (evt: AtpSessionEvent, sess?: AtpSessionData) => {
37
37
  // store the session-data for reuse
38
38
  }
39
39
  })
@@ -178,13 +178,13 @@ const res1 = await agent.com.atproto.repo.createRecord(
178
178
  }
179
179
  }
180
180
  )
181
- const res2 = await agent.com.atproto.repo.listRecords({user: alice.did, collection: 'app.bsky.feed.post'})
181
+ const res2 = await agent.com.atproto.repo.listRecords({repo: alice.did, collection: 'app.bsky.feed.post'})
182
182
 
183
- const res3 = await agent.app.bsky.feed.post.create({did: alice.did}, {
183
+ const res3 = await agent.app.bsky.feed.post.create({repo: alice.did}, {
184
184
  text: 'Hello, world!',
185
185
  createdAt: (new Date()).toISOString()
186
186
  })
187
- const res4 = await agent.app.bsky.feed.post.list({did: alice.did})
187
+ const res4 = await agent.app.bsky.feed.post.list({repo: alice.did})
188
188
  ```
189
189
 
190
190
  ### Generic agent
@@ -0,0 +1,27 @@
1
+ import { AtpServiceClient, ComAtprotoServerCreateAccount, ComAtprotoServerCreateSession, ComAtprotoServerGetSession } from './client';
2
+ import { AtpSessionData, AtpAgentCreateAccountOpts, AtpAgentLoginOpts, AtpAgentFetchHandler, AtpAgentGlobalOpts, AtpPersistSessionHandler, AtpAgentOpts } from './types';
3
+ export declare class AtpAgent {
4
+ service: URL;
5
+ api: AtpServiceClient;
6
+ session?: AtpSessionData;
7
+ private _baseClient;
8
+ private _persistSession?;
9
+ private _refreshSessionPromise;
10
+ get com(): import("./client").ComNS;
11
+ static fetch: AtpAgentFetchHandler | undefined;
12
+ static configure(opts: AtpAgentGlobalOpts): void;
13
+ constructor(opts: AtpAgentOpts);
14
+ get hasSession(): boolean;
15
+ setPersistSessionHandler(handler?: AtpPersistSessionHandler): void;
16
+ createAccount(opts: AtpAgentCreateAccountOpts): Promise<ComAtprotoServerCreateAccount.Response>;
17
+ login(opts: AtpAgentLoginOpts): Promise<ComAtprotoServerCreateSession.Response>;
18
+ resumeSession(session: AtpSessionData): Promise<ComAtprotoServerGetSession.Response>;
19
+ private _addAuthHeader;
20
+ private _fetch;
21
+ private _refreshSession;
22
+ private _refreshSessionInner;
23
+ uploadBlob: typeof this.api.com.atproto.repo.uploadBlob;
24
+ resolveHandle: typeof this.api.com.atproto.identity.resolveHandle;
25
+ updateHandle: typeof this.api.com.atproto.identity.updateHandle;
26
+ createModerationReport: typeof this.api.com.atproto.moderation.createReport;
27
+ }
@@ -0,0 +1,43 @@
1
+ import { AtpAgent } from './agent';
2
+ import { AppBskyFeedPost, AppBskyActorProfile } from './client';
3
+ export declare class BskyAgent extends AtpAgent {
4
+ get app(): import("./client").AppNS;
5
+ getTimeline: typeof this.api.app.bsky.feed.getTimeline;
6
+ getAuthorFeed: typeof this.api.app.bsky.feed.getAuthorFeed;
7
+ getPostThread: typeof this.api.app.bsky.feed.getPostThread;
8
+ getPost: typeof this.api.app.bsky.feed.post.get;
9
+ getLikes: typeof this.api.app.bsky.feed.getLikes;
10
+ getRepostedBy: typeof this.api.app.bsky.feed.getRepostedBy;
11
+ getFollows: typeof this.api.app.bsky.graph.getFollows;
12
+ getFollowers: typeof this.api.app.bsky.graph.getFollowers;
13
+ getProfile: typeof this.api.app.bsky.actor.getProfile;
14
+ getProfiles: typeof this.api.app.bsky.actor.getProfiles;
15
+ searchActors: typeof this.api.app.bsky.actor.searchActors;
16
+ searchActorsTypeahead: typeof this.api.app.bsky.actor.searchActorsTypeahead;
17
+ listNotifications: typeof this.api.app.bsky.notification.listNotifications;
18
+ countUnreadNotifications: typeof this.api.app.bsky.notification.getUnreadCount;
19
+ post(record: Partial<AppBskyFeedPost.Record> & Omit<AppBskyFeedPost.Record, 'createdAt'>): Promise<{
20
+ uri: string;
21
+ cid: string;
22
+ }>;
23
+ deletePost(postUri: string): Promise<void>;
24
+ like(uri: string, cid: string): Promise<{
25
+ uri: string;
26
+ cid: string;
27
+ }>;
28
+ deleteLike(likeUri: string): Promise<void>;
29
+ repost(uri: string, cid: string): Promise<{
30
+ uri: string;
31
+ cid: string;
32
+ }>;
33
+ deleteRepost(repostUri: string): Promise<void>;
34
+ follow(subjectDid: string): Promise<{
35
+ uri: string;
36
+ cid: string;
37
+ }>;
38
+ deleteFollow(followUri: string): Promise<void>;
39
+ upsertProfile(updateFn: (existing: AppBskyActorProfile.Record | undefined) => AppBskyActorProfile.Record | Promise<AppBskyActorProfile.Record>): Promise<void>;
40
+ mute(actor: string): Promise<import("./client/types/app/bsky/graph/muteActor").Response>;
41
+ unmute(actor: string): Promise<import("./client/types/app/bsky/graph/unmuteActor").Response>;
42
+ updateSeenNotifications(seenAt?: string): Promise<import("./client/types/app/bsky/notification/updateSeen").Response>;
43
+ }
@@ -11,6 +11,7 @@ import * as ComAtprotoAdminResolveModerationReports from './types/com/atproto/ad
11
11
  import * as ComAtprotoAdminReverseModerationAction from './types/com/atproto/admin/reverseModerationAction';
12
12
  import * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRepos';
13
13
  import * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction';
14
+ import * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail';
14
15
  import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle';
15
16
  import * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle';
16
17
  import * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle';
@@ -25,6 +26,7 @@ import * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords
25
26
  import * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord';
26
27
  import * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob';
27
28
  import * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount';
29
+ import * as ComAtprotoServerCreateAppPassword from './types/com/atproto/server/createAppPassword';
28
30
  import * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode';
29
31
  import * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes';
30
32
  import * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession';
@@ -33,10 +35,12 @@ import * as ComAtprotoServerDeleteSession from './types/com/atproto/server/delet
33
35
  import * as ComAtprotoServerDescribeServer from './types/com/atproto/server/describeServer';
34
36
  import * as ComAtprotoServerGetAccountInviteCodes from './types/com/atproto/server/getAccountInviteCodes';
35
37
  import * as ComAtprotoServerGetSession from './types/com/atproto/server/getSession';
38
+ import * as ComAtprotoServerListAppPasswords from './types/com/atproto/server/listAppPasswords';
36
39
  import * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession';
37
40
  import * as ComAtprotoServerRequestAccountDelete from './types/com/atproto/server/requestAccountDelete';
38
41
  import * as ComAtprotoServerRequestPasswordReset from './types/com/atproto/server/requestPasswordReset';
39
42
  import * as ComAtprotoServerResetPassword from './types/com/atproto/server/resetPassword';
43
+ import * as ComAtprotoServerRevokeAppPassword from './types/com/atproto/server/revokeAppPassword';
40
44
  import * as ComAtprotoSyncGetBlob from './types/com/atproto/sync/getBlob';
41
45
  import * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks';
42
46
  import * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout';
@@ -85,6 +89,7 @@ export * as ComAtprotoAdminResolveModerationReports from './types/com/atproto/ad
85
89
  export * as ComAtprotoAdminReverseModerationAction from './types/com/atproto/admin/reverseModerationAction';
86
90
  export * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRepos';
87
91
  export * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction';
92
+ export * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail';
88
93
  export * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle';
89
94
  export * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle';
90
95
  export * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle';
@@ -103,6 +108,7 @@ export * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord';
103
108
  export * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef';
104
109
  export * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob';
105
110
  export * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount';
111
+ export * as ComAtprotoServerCreateAppPassword from './types/com/atproto/server/createAppPassword';
106
112
  export * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode';
107
113
  export * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes';
108
114
  export * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession';
@@ -112,10 +118,12 @@ export * as ComAtprotoServerDeleteSession from './types/com/atproto/server/delet
112
118
  export * as ComAtprotoServerDescribeServer from './types/com/atproto/server/describeServer';
113
119
  export * as ComAtprotoServerGetAccountInviteCodes from './types/com/atproto/server/getAccountInviteCodes';
114
120
  export * as ComAtprotoServerGetSession from './types/com/atproto/server/getSession';
121
+ export * as ComAtprotoServerListAppPasswords from './types/com/atproto/server/listAppPasswords';
115
122
  export * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession';
116
123
  export * as ComAtprotoServerRequestAccountDelete from './types/com/atproto/server/requestAccountDelete';
117
124
  export * as ComAtprotoServerRequestPasswordReset from './types/com/atproto/server/requestPasswordReset';
118
125
  export * as ComAtprotoServerResetPassword from './types/com/atproto/server/resetPassword';
126
+ export * as ComAtprotoServerRevokeAppPassword from './types/com/atproto/server/revokeAppPassword';
119
127
  export * as ComAtprotoSyncGetBlob from './types/com/atproto/sync/getBlob';
120
128
  export * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks';
121
129
  export * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout';
@@ -166,6 +174,10 @@ export declare const COM_ATPROTO_ADMIN: {
166
174
  };
167
175
  export declare const COM_ATPROTO_MODERATION: {
168
176
  DefsReasonSpam: string;
177
+ DefsReasonViolation: string;
178
+ DefsReasonMisleading: string;
179
+ DefsReasonSexual: string;
180
+ DefsReasonRude: string;
169
181
  DefsReasonOther: string;
170
182
  };
171
183
  export declare class AtpBaseClient {
@@ -212,6 +224,7 @@ export declare class AdminNS {
212
224
  reverseModerationAction(data?: ComAtprotoAdminReverseModerationAction.InputSchema, opts?: ComAtprotoAdminReverseModerationAction.CallOptions): Promise<ComAtprotoAdminReverseModerationAction.Response>;
213
225
  searchRepos(params?: ComAtprotoAdminSearchRepos.QueryParams, opts?: ComAtprotoAdminSearchRepos.CallOptions): Promise<ComAtprotoAdminSearchRepos.Response>;
214
226
  takeModerationAction(data?: ComAtprotoAdminTakeModerationAction.InputSchema, opts?: ComAtprotoAdminTakeModerationAction.CallOptions): Promise<ComAtprotoAdminTakeModerationAction.Response>;
227
+ updateAccountEmail(data?: ComAtprotoAdminUpdateAccountEmail.InputSchema, opts?: ComAtprotoAdminUpdateAccountEmail.CallOptions): Promise<ComAtprotoAdminUpdateAccountEmail.Response>;
215
228
  updateAccountHandle(data?: ComAtprotoAdminUpdateAccountHandle.InputSchema, opts?: ComAtprotoAdminUpdateAccountHandle.CallOptions): Promise<ComAtprotoAdminUpdateAccountHandle.Response>;
216
229
  }
217
230
  export declare class IdentityNS {
@@ -246,6 +259,7 @@ export declare class ServerNS {
246
259
  _service: AtpServiceClient;
247
260
  constructor(service: AtpServiceClient);
248
261
  createAccount(data?: ComAtprotoServerCreateAccount.InputSchema, opts?: ComAtprotoServerCreateAccount.CallOptions): Promise<ComAtprotoServerCreateAccount.Response>;
262
+ createAppPassword(data?: ComAtprotoServerCreateAppPassword.InputSchema, opts?: ComAtprotoServerCreateAppPassword.CallOptions): Promise<ComAtprotoServerCreateAppPassword.Response>;
249
263
  createInviteCode(data?: ComAtprotoServerCreateInviteCode.InputSchema, opts?: ComAtprotoServerCreateInviteCode.CallOptions): Promise<ComAtprotoServerCreateInviteCode.Response>;
250
264
  createInviteCodes(data?: ComAtprotoServerCreateInviteCodes.InputSchema, opts?: ComAtprotoServerCreateInviteCodes.CallOptions): Promise<ComAtprotoServerCreateInviteCodes.Response>;
251
265
  createSession(data?: ComAtprotoServerCreateSession.InputSchema, opts?: ComAtprotoServerCreateSession.CallOptions): Promise<ComAtprotoServerCreateSession.Response>;
@@ -254,10 +268,12 @@ export declare class ServerNS {
254
268
  describeServer(params?: ComAtprotoServerDescribeServer.QueryParams, opts?: ComAtprotoServerDescribeServer.CallOptions): Promise<ComAtprotoServerDescribeServer.Response>;
255
269
  getAccountInviteCodes(params?: ComAtprotoServerGetAccountInviteCodes.QueryParams, opts?: ComAtprotoServerGetAccountInviteCodes.CallOptions): Promise<ComAtprotoServerGetAccountInviteCodes.Response>;
256
270
  getSession(params?: ComAtprotoServerGetSession.QueryParams, opts?: ComAtprotoServerGetSession.CallOptions): Promise<ComAtprotoServerGetSession.Response>;
271
+ listAppPasswords(params?: ComAtprotoServerListAppPasswords.QueryParams, opts?: ComAtprotoServerListAppPasswords.CallOptions): Promise<ComAtprotoServerListAppPasswords.Response>;
257
272
  refreshSession(data?: ComAtprotoServerRefreshSession.InputSchema, opts?: ComAtprotoServerRefreshSession.CallOptions): Promise<ComAtprotoServerRefreshSession.Response>;
258
273
  requestAccountDelete(data?: ComAtprotoServerRequestAccountDelete.InputSchema, opts?: ComAtprotoServerRequestAccountDelete.CallOptions): Promise<ComAtprotoServerRequestAccountDelete.Response>;
259
274
  requestPasswordReset(data?: ComAtprotoServerRequestPasswordReset.InputSchema, opts?: ComAtprotoServerRequestPasswordReset.CallOptions): Promise<ComAtprotoServerRequestPasswordReset.Response>;
260
275
  resetPassword(data?: ComAtprotoServerResetPassword.InputSchema, opts?: ComAtprotoServerResetPassword.CallOptions): Promise<ComAtprotoServerResetPassword.Response>;
276
+ revokeAppPassword(data?: ComAtprotoServerRevokeAppPassword.InputSchema, opts?: ComAtprotoServerRevokeAppPassword.CallOptions): Promise<ComAtprotoServerRevokeAppPassword.Response>;
261
277
  }
262
278
  export declare class SyncNS {
263
279
  _service: AtpServiceClient;
@@ -297,6 +297,13 @@ export declare const schemaDict: {
297
297
  type: string;
298
298
  ref: string;
299
299
  };
300
+ labels: {
301
+ type: string;
302
+ items: {
303
+ type: string;
304
+ ref: string;
305
+ };
306
+ };
300
307
  invitedBy: {
301
308
  type: string;
302
309
  ref: string;
@@ -378,6 +385,13 @@ export declare const schemaDict: {
378
385
  ref: string;
379
386
  };
380
387
  };
388
+ labels: {
389
+ type: string;
390
+ items: {
391
+ type: string;
392
+ ref: string;
393
+ };
394
+ };
381
395
  indexedAt: {
382
396
  type: string;
383
397
  format: string;
@@ -953,6 +967,33 @@ export declare const schemaDict: {
953
967
  };
954
968
  };
955
969
  };
970
+ ComAtprotoAdminUpdateAccountEmail: {
971
+ lexicon: number;
972
+ id: string;
973
+ defs: {
974
+ main: {
975
+ type: string;
976
+ description: string;
977
+ input: {
978
+ encoding: string;
979
+ schema: {
980
+ type: string;
981
+ required: string[];
982
+ properties: {
983
+ account: {
984
+ type: string;
985
+ format: string;
986
+ description: string;
987
+ };
988
+ email: {
989
+ type: string;
990
+ };
991
+ };
992
+ };
993
+ };
994
+ };
995
+ };
996
+ };
956
997
  ComAtprotoAdminUpdateAccountHandle: {
957
998
  lexicon: number;
958
999
  id: string;
@@ -1267,6 +1308,22 @@ export declare const schemaDict: {
1267
1308
  type: string;
1268
1309
  description: string;
1269
1310
  };
1311
+ reasonViolation: {
1312
+ type: string;
1313
+ description: string;
1314
+ };
1315
+ reasonMisleading: {
1316
+ type: string;
1317
+ description: string;
1318
+ };
1319
+ reasonSexual: {
1320
+ type: string;
1321
+ description: string;
1322
+ };
1323
+ reasonRude: {
1324
+ type: string;
1325
+ description: string;
1326
+ };
1270
1327
  reasonOther: {
1271
1328
  type: string;
1272
1329
  description: string;
@@ -1848,6 +1905,54 @@ export declare const schemaDict: {
1848
1905
  };
1849
1906
  };
1850
1907
  };
1908
+ ComAtprotoServerCreateAppPassword: {
1909
+ lexicon: number;
1910
+ id: string;
1911
+ defs: {
1912
+ main: {
1913
+ type: string;
1914
+ description: string;
1915
+ input: {
1916
+ encoding: string;
1917
+ schema: {
1918
+ type: string;
1919
+ required: string[];
1920
+ properties: {
1921
+ name: {
1922
+ type: string;
1923
+ };
1924
+ };
1925
+ };
1926
+ };
1927
+ output: {
1928
+ encoding: string;
1929
+ schema: {
1930
+ type: string;
1931
+ ref: string;
1932
+ };
1933
+ };
1934
+ errors: {
1935
+ name: string;
1936
+ }[];
1937
+ };
1938
+ appPassword: {
1939
+ type: string;
1940
+ required: string[];
1941
+ properties: {
1942
+ name: {
1943
+ type: string;
1944
+ };
1945
+ password: {
1946
+ type: string;
1947
+ };
1948
+ createdAt: {
1949
+ type: string;
1950
+ format: string;
1951
+ };
1952
+ };
1953
+ };
1954
+ };
1955
+ };
1851
1956
  ComAtprotoServerCreateInviteCode: {
1852
1957
  lexicon: number;
1853
1958
  id: string;
@@ -1906,9 +2011,12 @@ export declare const schemaDict: {
1906
2011
  useCount: {
1907
2012
  type: string;
1908
2013
  };
1909
- forAccount: {
2014
+ forAccounts: {
1910
2015
  type: string;
1911
- format: string;
2016
+ items: {
2017
+ type: string;
2018
+ format: string;
2019
+ };
1912
2020
  };
1913
2021
  };
1914
2022
  };
@@ -1923,12 +2031,28 @@ export declare const schemaDict: {
1923
2031
  type: string;
1924
2032
  items: {
1925
2033
  type: string;
2034
+ ref: string;
1926
2035
  };
1927
2036
  };
1928
2037
  };
1929
2038
  };
1930
2039
  };
1931
2040
  };
2041
+ accountCodes: {
2042
+ type: string;
2043
+ required: string[];
2044
+ properties: {
2045
+ account: {
2046
+ type: string;
2047
+ };
2048
+ codes: {
2049
+ type: string;
2050
+ items: {
2051
+ type: string;
2052
+ };
2053
+ };
2054
+ };
2055
+ };
1932
2056
  };
1933
2057
  };
1934
2058
  ComAtprotoServerCreateSession: {
@@ -2195,6 +2319,48 @@ export declare const schemaDict: {
2195
2319
  };
2196
2320
  };
2197
2321
  };
2322
+ ComAtprotoServerListAppPasswords: {
2323
+ lexicon: number;
2324
+ id: string;
2325
+ defs: {
2326
+ main: {
2327
+ type: string;
2328
+ description: string;
2329
+ output: {
2330
+ encoding: string;
2331
+ schema: {
2332
+ type: string;
2333
+ required: string[];
2334
+ properties: {
2335
+ passwords: {
2336
+ type: string;
2337
+ items: {
2338
+ type: string;
2339
+ ref: string;
2340
+ };
2341
+ };
2342
+ };
2343
+ };
2344
+ };
2345
+ errors: {
2346
+ name: string;
2347
+ }[];
2348
+ };
2349
+ appPassword: {
2350
+ type: string;
2351
+ required: string[];
2352
+ properties: {
2353
+ name: {
2354
+ type: string;
2355
+ };
2356
+ createdAt: {
2357
+ type: string;
2358
+ format: string;
2359
+ };
2360
+ };
2361
+ };
2362
+ };
2363
+ };
2198
2364
  ComAtprotoServerRefreshSession: {
2199
2365
  lexicon: number;
2200
2366
  id: string;
@@ -2291,6 +2457,28 @@ export declare const schemaDict: {
2291
2457
  };
2292
2458
  };
2293
2459
  };
2460
+ ComAtprotoServerRevokeAppPassword: {
2461
+ lexicon: number;
2462
+ id: string;
2463
+ defs: {
2464
+ main: {
2465
+ type: string;
2466
+ description: string;
2467
+ input: {
2468
+ encoding: string;
2469
+ schema: {
2470
+ type: string;
2471
+ required: string[];
2472
+ properties: {
2473
+ name: {
2474
+ type: string;
2475
+ };
2476
+ };
2477
+ };
2478
+ };
2479
+ };
2480
+ };
2481
+ };
2294
2482
  ComAtprotoSyncGetBlob: {
2295
2483
  lexicon: number;
2296
2484
  id: string;
@@ -4241,6 +4429,15 @@ export declare const schemaDict: {
4241
4429
  defs: {
4242
4430
  main: {
4243
4431
  type: string;
4432
+ parameters: {
4433
+ type: string;
4434
+ properties: {
4435
+ seenAt: {
4436
+ type: string;
4437
+ format: string;
4438
+ };
4439
+ };
4440
+ };
4244
4441
  output: {
4245
4442
  encoding: string;
4246
4443
  schema: {
@@ -4274,6 +4471,10 @@ export declare const schemaDict: {
4274
4471
  cursor: {
4275
4472
  type: string;
4276
4473
  };
4474
+ seenAt: {
4475
+ type: string;
4476
+ format: string;
4477
+ };
4277
4478
  };
4278
4479
  };
4279
4480
  output: {
@@ -4485,6 +4686,7 @@ export declare const ids: {
4485
4686
  ComAtprotoAdminReverseModerationAction: string;
4486
4687
  ComAtprotoAdminSearchRepos: string;
4487
4688
  ComAtprotoAdminTakeModerationAction: string;
4689
+ ComAtprotoAdminUpdateAccountEmail: string;
4488
4690
  ComAtprotoAdminUpdateAccountHandle: string;
4489
4691
  ComAtprotoIdentityResolveHandle: string;
4490
4692
  ComAtprotoIdentityUpdateHandle: string;
@@ -4503,6 +4705,7 @@ export declare const ids: {
4503
4705
  ComAtprotoRepoStrongRef: string;
4504
4706
  ComAtprotoRepoUploadBlob: string;
4505
4707
  ComAtprotoServerCreateAccount: string;
4708
+ ComAtprotoServerCreateAppPassword: string;
4506
4709
  ComAtprotoServerCreateInviteCode: string;
4507
4710
  ComAtprotoServerCreateInviteCodes: string;
4508
4711
  ComAtprotoServerCreateSession: string;
@@ -4512,10 +4715,12 @@ export declare const ids: {
4512
4715
  ComAtprotoServerDescribeServer: string;
4513
4716
  ComAtprotoServerGetAccountInviteCodes: string;
4514
4717
  ComAtprotoServerGetSession: string;
4718
+ ComAtprotoServerListAppPasswords: string;
4515
4719
  ComAtprotoServerRefreshSession: string;
4516
4720
  ComAtprotoServerRequestAccountDelete: string;
4517
4721
  ComAtprotoServerRequestPasswordReset: string;
4518
4722
  ComAtprotoServerResetPassword: string;
4723
+ ComAtprotoServerRevokeAppPassword: string;
4519
4724
  ComAtprotoSyncGetBlob: string;
4520
4725
  ComAtprotoSyncGetBlocks: string;
4521
4726
  ComAtprotoSyncGetCheckout: string;
@@ -0,0 +1,32 @@
1
+ import { Headers, XRPCError } from '@atproto/xrpc';
2
+ import * as AppBskySystemDeclRef from '../system/declRef';
3
+ export interface QueryParams {
4
+ }
5
+ export interface InputSchema {
6
+ handle: string;
7
+ recoveryKey?: string;
8
+ [k: string]: unknown;
9
+ }
10
+ export interface OutputSchema {
11
+ handle: string;
12
+ did: string;
13
+ declaration: AppBskySystemDeclRef.Main;
14
+ [k: string]: unknown;
15
+ }
16
+ export interface CallOptions {
17
+ headers?: Headers;
18
+ qp?: QueryParams;
19
+ encoding: 'application/json';
20
+ }
21
+ export interface Response {
22
+ success: boolean;
23
+ headers: Headers;
24
+ data: OutputSchema;
25
+ }
26
+ export declare class InvalidHandleError extends XRPCError {
27
+ constructor(src: XRPCError);
28
+ }
29
+ export declare class HandleNotAvailableError extends XRPCError {
30
+ constructor(src: XRPCError);
31
+ }
32
+ export declare function toKnownErr(e: any): any;
@@ -0,0 +1,16 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import * as AppBskyActorDefs from './defs';
3
+ export interface QueryParams {
4
+ actor: string;
5
+ }
6
+ export declare type InputSchema = undefined;
7
+ export declare type OutputSchema = AppBskyActorDefs.ProfileViewDetailed;
8
+ export interface CallOptions {
9
+ headers?: Headers;
10
+ }
11
+ export interface Response {
12
+ success: boolean;
13
+ headers: Headers;
14
+ data: OutputSchema;
15
+ }
16
+ export declare function toKnownErr(e: any): any;
@@ -0,0 +1,19 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import * as AppBskyActorDefs from './defs';
3
+ export interface QueryParams {
4
+ actors: string[];
5
+ }
6
+ export declare type InputSchema = undefined;
7
+ export interface OutputSchema {
8
+ profiles: AppBskyActorDefs.ProfileViewDetailed[];
9
+ [k: string]: unknown;
10
+ }
11
+ export interface CallOptions {
12
+ headers?: Headers;
13
+ }
14
+ export interface Response {
15
+ success: boolean;
16
+ headers: Headers;
17
+ data: OutputSchema;
18
+ }
19
+ export declare function toKnownErr(e: any): any;
@@ -0,0 +1,21 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import * as AppBskyActorDefs from './defs';
3
+ export interface QueryParams {
4
+ limit?: number;
5
+ cursor?: string;
6
+ }
7
+ export declare type InputSchema = undefined;
8
+ export interface OutputSchema {
9
+ cursor?: string;
10
+ actors: AppBskyActorDefs.ProfileView[];
11
+ [k: string]: unknown;
12
+ }
13
+ export interface CallOptions {
14
+ headers?: Headers;
15
+ }
16
+ export interface Response {
17
+ success: boolean;
18
+ headers: Headers;
19
+ data: OutputSchema;
20
+ }
21
+ export declare function toKnownErr(e: any): any;
@@ -0,0 +1,10 @@
1
+ import { ValidationResult, BlobRef } from '@atproto/lexicon';
2
+ export interface Record {
3
+ displayName?: string;
4
+ description?: string;
5
+ avatar?: BlobRef;
6
+ banner?: BlobRef;
7
+ [k: string]: unknown;
8
+ }
9
+ export declare function isRecord(v: unknown): v is Record;
10
+ export declare function validateRecord(v: unknown): ValidationResult;
@@ -0,0 +1,28 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ import * as AppBskySystemDeclRef from '../system/declRef';
3
+ export interface Main {
4
+ did: string;
5
+ declarationCid: string;
6
+ [k: string]: unknown;
7
+ }
8
+ export declare function isMain(v: unknown): v is Main;
9
+ export declare function validateMain(v: unknown): ValidationResult;
10
+ export interface WithInfo {
11
+ did: string;
12
+ declaration: AppBskySystemDeclRef.Main;
13
+ handle: string;
14
+ displayName?: string;
15
+ avatar?: string;
16
+ viewer?: ViewerState;
17
+ [k: string]: unknown;
18
+ }
19
+ export declare function isWithInfo(v: unknown): v is WithInfo;
20
+ export declare function validateWithInfo(v: unknown): ValidationResult;
21
+ export interface ViewerState {
22
+ muted?: boolean;
23
+ following?: string;
24
+ followedBy?: string;
25
+ [k: string]: unknown;
26
+ }
27
+ export declare function isViewerState(v: unknown): v is ViewerState;
28
+ export declare function validateViewerState(v: unknown): ValidationResult;
@@ -0,0 +1,22 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import * as AppBskyActorProfile from './profile';
3
+ export interface QueryParams {
4
+ term?: string;
5
+ limit?: number;
6
+ before?: string;
7
+ }
8
+ export declare type InputSchema = undefined;
9
+ export interface OutputSchema {
10
+ cursor?: string;
11
+ users: AppBskyActorProfile.ViewBasic[];
12
+ [k: string]: unknown;
13
+ }
14
+ export interface CallOptions {
15
+ headers?: Headers;
16
+ }
17
+ export interface Response {
18
+ success: boolean;
19
+ headers: Headers;
20
+ data: OutputSchema;
21
+ }
22
+ export declare function toKnownErr(e: any): any;