@atproto/api 0.1.3 → 0.2.1

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 (208) hide show
  1. package/README.md +179 -25
  2. package/build.js +2 -1
  3. package/dist/agent.d.ts +11 -6
  4. package/dist/bsky-agent.d.ts +43 -0
  5. package/dist/client/index.d.ts +117 -215
  6. package/dist/client/lexicons.d.ts +1447 -1401
  7. package/dist/client/types/app/bsky/actor/defs.d.ts +47 -0
  8. package/dist/client/types/app/bsky/actor/getProfile.d.ts +2 -2
  9. package/dist/client/types/app/bsky/actor/getProfiles.d.ts +2 -2
  10. package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +2 -2
  11. package/dist/client/types/app/bsky/actor/profile.d.ts +4 -60
  12. package/dist/client/types/app/bsky/actor/searchActors.d.ts +22 -0
  13. package/dist/client/types/app/bsky/actor/searchActorsTypeahead.d.ts +20 -0
  14. package/dist/client/types/app/bsky/embed/complexRecord.d.ts +24 -0
  15. package/dist/client/types/app/bsky/embed/external.d.ts +9 -13
  16. package/dist/client/types/app/bsky/embed/images.d.ts +9 -13
  17. package/dist/client/types/app/bsky/embed/post.d.ts +33 -0
  18. package/dist/client/types/app/bsky/embed/record.d.ts +21 -13
  19. package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts +24 -0
  20. package/dist/client/types/app/bsky/feed/defs.d.ts +77 -0
  21. package/dist/client/types/app/bsky/feed/getAuthorFeed.d.ts +4 -4
  22. package/dist/client/types/app/bsky/{graph/getMembers.d.ts → feed/getLikes.d.ts} +12 -14
  23. package/dist/client/types/app/bsky/feed/getPostThread.d.ts +2 -24
  24. package/dist/client/types/app/bsky/feed/getRepostedBy.d.ts +3 -3
  25. package/dist/client/types/app/bsky/feed/getTimeline.d.ts +3 -3
  26. package/dist/client/types/app/bsky/feed/post.d.ts +4 -29
  27. package/dist/client/types/app/bsky/graph/follow.d.ts +1 -2
  28. package/dist/client/types/app/bsky/graph/getFollowers.d.ts +5 -5
  29. package/dist/client/types/app/bsky/graph/getFollows.d.ts +5 -5
  30. package/dist/client/types/app/bsky/graph/getMutes.d.ts +3 -3
  31. package/dist/client/types/app/bsky/{notification/updateSeen.d.ts → graph/muteActor.d.ts} +1 -1
  32. package/dist/client/types/app/bsky/graph/unmuteActor.d.ts +17 -0
  33. package/dist/client/types/app/bsky/notification/getUnreadCount.d.ts +17 -0
  34. package/dist/client/types/app/bsky/{graph/getMemberships.d.ts → notification/listNotifications.d.ts} +13 -14
  35. package/dist/client/types/app/bsky/richtext/facet.d.ts +30 -0
  36. package/dist/client/types/app/bsky/unspecced/getPopular.d.ts +21 -0
  37. package/dist/client/types/com/atproto/admin/defs.d.ts +181 -0
  38. package/dist/client/types/com/atproto/admin/getModerationAction.d.ts +2 -2
  39. package/dist/client/types/com/atproto/admin/getModerationActions.d.ts +3 -3
  40. package/dist/client/types/com/atproto/admin/getModerationReport.d.ts +2 -2
  41. package/dist/client/types/com/atproto/admin/getModerationReports.d.ts +3 -3
  42. package/dist/client/types/com/atproto/admin/getRecord.d.ts +2 -2
  43. package/dist/client/types/com/atproto/admin/getRepo.d.ts +2 -2
  44. package/dist/client/types/com/atproto/admin/resolveModerationReports.d.ts +2 -2
  45. package/dist/client/types/com/atproto/admin/reverseModerationAction.d.ts +2 -2
  46. package/dist/client/types/com/atproto/admin/searchRepos.d.ts +3 -3
  47. package/dist/client/types/com/atproto/admin/takeModerationAction.d.ts +5 -6
  48. package/dist/client/types/com/atproto/{sync/getHead.d.ts → identity/resolveHandle.d.ts} +2 -2
  49. package/dist/client/types/com/atproto/identity/updateHandle.d.ts +17 -0
  50. package/dist/client/types/com/atproto/moderation/createReport.d.ts +38 -0
  51. package/dist/client/types/com/atproto/moderation/defs.d.ts +3 -0
  52. package/dist/client/types/com/atproto/repo/applyWrites.d.ts +47 -0
  53. package/dist/client/types/com/atproto/repo/createRecord.d.ts +7 -2
  54. package/dist/client/types/com/atproto/repo/deleteRecord.d.ts +7 -2
  55. package/dist/client/types/com/atproto/repo/describeRepo.d.ts +22 -0
  56. package/dist/client/types/com/atproto/repo/getRecord.d.ts +1 -1
  57. package/dist/client/types/com/atproto/repo/listRecords.d.ts +3 -3
  58. package/dist/client/types/com/atproto/repo/putRecord.d.ts +7 -2
  59. package/dist/client/types/com/atproto/repo/uploadBlob.d.ts +20 -0
  60. package/dist/client/types/{app/bsky/actor/createScene.d.ts → com/atproto/server/createAccount.d.ts} +14 -2
  61. package/dist/client/types/com/atproto/server/createInviteCode.d.ts +22 -0
  62. package/dist/client/types/com/atproto/server/createSession.d.ts +29 -0
  63. package/dist/client/types/com/atproto/server/deleteAccount.d.ts +25 -0
  64. package/dist/client/types/com/atproto/{sync/getRecord.d.ts → server/deleteSession.d.ts} +1 -5
  65. package/dist/client/types/com/atproto/server/describeServer.d.ts +27 -0
  66. package/dist/client/types/com/atproto/{sync/getRoot.d.ts → server/getSession.d.ts} +2 -2
  67. package/dist/client/types/com/atproto/server/refreshSession.d.ts +24 -0
  68. package/dist/client/types/com/atproto/{sync/updateRepo.d.ts → server/requestAccountDelete.d.ts} +1 -3
  69. package/dist/client/types/com/atproto/server/requestPasswordReset.d.ts +17 -0
  70. package/dist/client/types/com/atproto/server/resetPassword.d.ts +24 -0
  71. package/dist/client/types/com/atproto/sync/{getCheckout.d.ts → getBlob.d.ts} +1 -1
  72. package/dist/client/types/com/atproto/sync/{getCommitPath.d.ts → listBlobs.d.ts} +1 -1
  73. package/dist/client/types/com/atproto/sync/notifyOfUpdate.d.ts +1 -0
  74. package/dist/client/types/com/atproto/sync/requestCrawl.d.ts +1 -1
  75. package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +9 -1
  76. package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +58 -0
  77. package/dist/index.d.ts +6 -0
  78. package/dist/index.js +8055 -3651
  79. package/dist/index.js.map +4 -4
  80. package/dist/rich-text/detection.d.ts +4 -0
  81. package/dist/rich-text/rich-text.d.ts +39 -0
  82. package/dist/rich-text/sanitization.d.ts +4 -0
  83. package/dist/rich-text/unicode.d.ts +11 -0
  84. package/dist/types.d.ts +2 -2
  85. package/docs/rn-fetch-handler.ts +88 -0
  86. package/package.json +4 -1
  87. package/src/agent.ts +51 -15
  88. package/src/bsky-agent.ts +228 -0
  89. package/src/client/index.ts +330 -581
  90. package/src/client/lexicons.ts +1833 -1779
  91. package/src/client/types/app/bsky/actor/defs.ts +97 -0
  92. package/src/client/types/app/bsky/actor/getProfile.ts +4 -3
  93. package/src/client/types/app/bsky/actor/getProfiles.ts +4 -3
  94. package/src/client/types/app/bsky/actor/getSuggestions.ts +4 -3
  95. package/src/client/types/app/bsky/actor/profile.ts +5 -95
  96. package/src/client/types/app/bsky/actor/{searchTypeahead.ts → searchActors.ts} +6 -3
  97. package/src/client/types/app/bsky/actor/{search.ts → searchActorsTypeahead.ts} +4 -5
  98. package/src/client/types/app/bsky/embed/external.ts +14 -13
  99. package/src/client/types/app/bsky/embed/images.ts +14 -15
  100. package/src/client/types/app/bsky/embed/record.ts +32 -25
  101. package/src/client/types/app/bsky/embed/recordWithMedia.ts +53 -0
  102. package/src/client/types/app/bsky/feed/defs.ts +156 -0
  103. package/src/client/types/app/bsky/feed/getAuthorFeed.ts +6 -5
  104. package/src/client/types/app/bsky/feed/{getVotes.ts → getLikes.ts} +11 -12
  105. package/src/client/types/app/bsky/feed/getPostThread.ts +5 -48
  106. package/src/client/types/app/bsky/feed/getRepostedBy.ts +5 -4
  107. package/src/client/types/app/bsky/feed/getTimeline.ts +5 -4
  108. package/src/client/types/app/bsky/feed/{vote.ts → like.ts} +4 -4
  109. package/src/client/types/app/bsky/feed/post.ts +10 -52
  110. package/src/client/types/app/bsky/feed/repost.ts +2 -1
  111. package/src/client/types/app/bsky/graph/follow.ts +3 -3
  112. package/src/client/types/app/bsky/graph/getFollowers.ts +7 -6
  113. package/src/client/types/app/bsky/graph/getFollows.ts +7 -6
  114. package/src/client/types/app/bsky/graph/getMutes.ts +5 -4
  115. package/src/client/types/app/bsky/graph/{mute.ts → muteActor.ts} +3 -2
  116. package/src/client/types/app/bsky/graph/{unmute.ts → unmuteActor.ts} +3 -2
  117. package/src/client/types/app/bsky/notification/{getCount.ts → getUnreadCount.ts} +2 -1
  118. package/src/client/types/app/bsky/notification/{list.ts → listNotifications.ts} +13 -9
  119. package/src/client/types/app/bsky/notification/updateSeen.ts +2 -1
  120. package/src/client/types/app/bsky/richtext/facet.ts +81 -0
  121. package/src/client/types/app/bsky/unspecced/getPopular.ts +38 -0
  122. package/src/client/types/com/atproto/admin/defs.ts +366 -0
  123. package/src/client/types/com/atproto/admin/getModerationAction.ts +4 -3
  124. package/src/client/types/com/atproto/admin/getModerationActions.ts +5 -4
  125. package/src/client/types/com/atproto/admin/getModerationReport.ts +4 -3
  126. package/src/client/types/com/atproto/admin/getModerationReports.ts +5 -4
  127. package/src/client/types/com/atproto/admin/getRecord.ts +4 -3
  128. package/src/client/types/com/atproto/admin/getRepo.ts +4 -3
  129. package/src/client/types/com/atproto/admin/resolveModerationReports.ts +4 -3
  130. package/src/client/types/com/atproto/admin/reverseModerationAction.ts +4 -3
  131. package/src/client/types/com/atproto/admin/searchRepos.ts +5 -4
  132. package/src/client/types/com/atproto/admin/takeModerationAction.ts +10 -10
  133. package/src/client/types/com/atproto/{handle/resolve.ts → identity/resolveHandle.ts} +2 -1
  134. package/src/client/types/com/atproto/{handle/update.ts → identity/updateHandle.ts} +2 -1
  135. package/src/client/types/com/atproto/{report/create.ts → moderation/createReport.ts} +10 -10
  136. package/src/client/types/com/atproto/moderation/defs.ts +17 -0
  137. package/src/client/types/com/atproto/repo/{batchWrite.ts → applyWrites.ts} +21 -12
  138. package/src/client/types/com/atproto/repo/createRecord.ts +15 -3
  139. package/src/client/types/com/atproto/repo/deleteRecord.ts +15 -3
  140. package/src/client/types/com/atproto/repo/{describe.ts → describeRepo.ts} +3 -2
  141. package/src/client/types/com/atproto/repo/getRecord.ts +4 -3
  142. package/src/client/types/com/atproto/repo/listRecords.ts +7 -6
  143. package/src/client/types/com/atproto/repo/putRecord.ts +18 -6
  144. package/src/client/types/com/atproto/repo/strongRef.ts +2 -1
  145. package/src/client/types/com/atproto/{blob/upload.ts → repo/uploadBlob.ts} +3 -2
  146. package/src/client/types/com/atproto/{account/create.ts → server/createAccount.ts} +9 -1
  147. package/src/client/types/com/atproto/{account → server}/createInviteCode.ts +2 -1
  148. package/src/client/types/com/atproto/{session/create.ts → server/createSession.ts} +2 -1
  149. package/src/client/types/com/atproto/{account/delete.ts → server/deleteAccount.ts} +2 -1
  150. package/src/client/types/com/atproto/{account/requestDelete.ts → server/deleteSession.ts} +2 -1
  151. package/src/client/types/com/atproto/server/{getAccountsConfig.ts → describeServer.ts} +4 -3
  152. package/src/client/types/com/atproto/{session/get.ts → server/getSession.ts} +2 -1
  153. package/src/client/types/com/atproto/{session/refresh.ts → server/refreshSession.ts} +2 -1
  154. package/src/client/types/com/atproto/{session/delete.ts → server/requestAccountDelete.ts} +2 -1
  155. package/src/client/types/com/atproto/{account → server}/requestPasswordReset.ts +2 -1
  156. package/src/client/types/com/atproto/{account → server}/resetPassword.ts +2 -1
  157. package/src/client/types/com/atproto/sync/getBlob.ts +33 -0
  158. package/src/client/types/com/atproto/sync/getBlocks.ts +2 -1
  159. package/src/client/types/com/atproto/sync/getCheckout.ts +2 -1
  160. package/src/client/types/com/atproto/sync/getCommitPath.ts +2 -1
  161. package/src/client/types/com/atproto/sync/getHead.ts +2 -1
  162. package/src/client/types/com/atproto/sync/getRecord.ts +2 -1
  163. package/src/client/types/com/atproto/sync/getRepo.ts +2 -1
  164. package/src/client/types/com/atproto/sync/listBlobs.ts +40 -0
  165. package/src/client/types/com/atproto/sync/notifyOfUpdate.ts +6 -2
  166. package/src/client/types/com/atproto/sync/requestCrawl.ts +3 -2
  167. package/src/client/types/com/atproto/sync/subscribeRepos.ts +131 -0
  168. package/src/index.ts +12 -0
  169. package/src/rich-text/detection.ts +83 -0
  170. package/src/rich-text/rich-text.ts +401 -0
  171. package/src/rich-text/sanitization.ts +40 -0
  172. package/src/rich-text/unicode.ts +47 -0
  173. package/src/types.ts +2 -2
  174. package/tests/agent.test.ts +10 -6
  175. package/tests/bsky-agent.test.ts +140 -0
  176. package/tests/errors.test.ts +4 -4
  177. package/tests/rich-text-detection.test.ts +229 -0
  178. package/tests/rich-text-sanitization.test.ts +211 -0
  179. package/tests/rich-text.test.ts +661 -0
  180. package/tsconfig.build.tsbuildinfo +1 -1
  181. package/dist/client/types/app/bsky/feed/trend.d.ts +0 -9
  182. package/dist/client/types/app/bsky/graph/getAssertions.d.ts +0 -48
  183. package/dist/client/types/app/bsky/system/actorScene.d.ts +0 -1
  184. package/dist/client/types/com/atproto/repo/strongRef.d.ts +0 -8
  185. package/dist/client/util.d.ts +0 -2
  186. package/src/client/types/app/bsky/actor/ref.ts +0 -64
  187. package/src/client/types/app/bsky/actor/updateProfile.ts +0 -71
  188. package/src/client/types/app/bsky/feed/feedViewPost.ts +0 -64
  189. package/src/client/types/app/bsky/feed/setVote.ts +0 -40
  190. package/src/client/types/app/bsky/graph/assertCreator.ts +0 -9
  191. package/src/client/types/app/bsky/graph/assertMember.ts +0 -9
  192. package/src/client/types/app/bsky/graph/assertion.ts +0 -27
  193. package/src/client/types/app/bsky/graph/confirmation.ts +0 -28
  194. package/src/client/types/app/bsky/system/actorUser.ts +0 -9
  195. package/src/client/types/app/bsky/system/declRef.ts +0 -26
  196. package/src/client/types/app/bsky/system/declaration.ts +0 -24
  197. package/src/client/types/com/atproto/account/get.ts +0 -26
  198. package/src/client/types/com/atproto/admin/blob.ts +0 -84
  199. package/src/client/types/com/atproto/admin/moderationAction.ts +0 -118
  200. package/src/client/types/com/atproto/admin/moderationReport.ts +0 -64
  201. package/src/client/types/com/atproto/admin/record.ts +0 -92
  202. package/src/client/types/com/atproto/admin/repo.ts +0 -103
  203. package/src/client/types/com/atproto/repo/recordRef.ts +0 -25
  204. package/src/client/types/com/atproto/repo/repoRef.ts +0 -24
  205. package/src/client/types/com/atproto/report/reasonType.ts +0 -16
  206. package/src/client/types/com/atproto/report/subject.ts +0 -66
  207. package/src/client/types/com/atproto/sync/subscribeAllRepos.ts +0 -7
  208. /package/dist/client/types/app/bsky/feed/{repost.d.ts → like.d.ts} +0 -0
@@ -0,0 +1,47 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ export interface ProfileViewBasic {
3
+ did: string;
4
+ handle: string;
5
+ displayName?: string;
6
+ avatar?: string;
7
+ viewer?: ViewerState;
8
+ [k: string]: unknown;
9
+ }
10
+ export declare function isProfileViewBasic(v: unknown): v is ProfileViewBasic;
11
+ export declare function validateProfileViewBasic(v: unknown): ValidationResult;
12
+ export interface ProfileView {
13
+ did: string;
14
+ handle: string;
15
+ displayName?: string;
16
+ description?: string;
17
+ avatar?: string;
18
+ indexedAt?: string;
19
+ viewer?: ViewerState;
20
+ [k: string]: unknown;
21
+ }
22
+ export declare function isProfileView(v: unknown): v is ProfileView;
23
+ export declare function validateProfileView(v: unknown): ValidationResult;
24
+ export interface ProfileViewDetailed {
25
+ did: string;
26
+ handle: string;
27
+ displayName?: string;
28
+ description?: string;
29
+ avatar?: string;
30
+ banner?: string;
31
+ followersCount?: number;
32
+ followsCount?: number;
33
+ postsCount?: number;
34
+ indexedAt?: string;
35
+ viewer?: ViewerState;
36
+ [k: string]: unknown;
37
+ }
38
+ export declare function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed;
39
+ export declare function validateProfileViewDetailed(v: unknown): ValidationResult;
40
+ export interface ViewerState {
41
+ muted?: boolean;
42
+ following?: string;
43
+ followedBy?: string;
44
+ [k: string]: unknown;
45
+ }
46
+ export declare function isViewerState(v: unknown): v is ViewerState;
47
+ export declare function validateViewerState(v: unknown): ValidationResult;
@@ -1,10 +1,10 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
- import * as AppBskyActorProfile from './profile';
2
+ import * as AppBskyActorDefs from './defs';
3
3
  export interface QueryParams {
4
4
  actor: string;
5
5
  }
6
6
  export declare type InputSchema = undefined;
7
- export declare type OutputSchema = AppBskyActorProfile.View;
7
+ export declare type OutputSchema = AppBskyActorDefs.ProfileViewDetailed;
8
8
  export interface CallOptions {
9
9
  headers?: Headers;
10
10
  }
@@ -1,11 +1,11 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
- import * as AppBskyActorProfile from './profile';
2
+ import * as AppBskyActorDefs from './defs';
3
3
  export interface QueryParams {
4
4
  actors: string[];
5
5
  }
6
6
  export declare type InputSchema = undefined;
7
7
  export interface OutputSchema {
8
- profiles: AppBskyActorProfile.View[];
8
+ profiles: AppBskyActorDefs.ProfileViewDetailed[];
9
9
  [k: string]: unknown;
10
10
  }
11
11
  export interface CallOptions {
@@ -1,5 +1,5 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
- import * as AppBskyActorProfile from './profile';
2
+ import * as AppBskyActorDefs from './defs';
3
3
  export interface QueryParams {
4
4
  limit?: number;
5
5
  cursor?: string;
@@ -7,7 +7,7 @@ export interface QueryParams {
7
7
  export declare type InputSchema = undefined;
8
8
  export interface OutputSchema {
9
9
  cursor?: string;
10
- actors: AppBskyActorProfile.ViewBasic[];
10
+ actors: AppBskyActorDefs.ProfileView[];
11
11
  [k: string]: unknown;
12
12
  }
13
13
  export interface CallOptions {
@@ -1,66 +1,10 @@
1
- import { ValidationResult } from '@atproto/lexicon';
2
- import * as AppBskySystemDeclRef from '../system/declRef';
1
+ import { ValidationResult, BlobRef } from '@atproto/lexicon';
3
2
  export interface Record {
4
- displayName: string;
3
+ displayName?: string;
5
4
  description?: string;
6
- avatar?: {
7
- cid: string;
8
- mimeType: string;
9
- [k: string]: unknown;
10
- };
11
- banner?: {
12
- cid: string;
13
- mimeType: string;
14
- [k: string]: unknown;
15
- };
5
+ avatar?: BlobRef;
6
+ banner?: BlobRef;
16
7
  [k: string]: unknown;
17
8
  }
18
9
  export declare function isRecord(v: unknown): v is Record;
19
10
  export declare function validateRecord(v: unknown): ValidationResult;
20
- export interface View {
21
- did: string;
22
- declaration: AppBskySystemDeclRef.Main;
23
- handle: string;
24
- displayName?: string;
25
- description?: string;
26
- avatar?: string;
27
- banner?: string;
28
- followersCount: number;
29
- followsCount: number;
30
- postsCount: number;
31
- creator: string;
32
- indexedAt?: string;
33
- viewer?: ViewerState;
34
- myState?: MyState;
35
- [k: string]: unknown;
36
- }
37
- export declare function isView(v: unknown): v is View;
38
- export declare function validateView(v: unknown): ValidationResult;
39
- export interface ViewBasic {
40
- did: string;
41
- declaration: AppBskySystemDeclRef.Main;
42
- handle: string;
43
- displayName?: string;
44
- description?: string;
45
- avatar?: string;
46
- indexedAt?: string;
47
- viewer?: ViewerState;
48
- [k: string]: unknown;
49
- }
50
- export declare function isViewBasic(v: unknown): v is ViewBasic;
51
- export declare function validateViewBasic(v: unknown): ValidationResult;
52
- export interface ViewerState {
53
- muted?: boolean;
54
- following?: string;
55
- followedBy?: string;
56
- [k: string]: unknown;
57
- }
58
- export declare function isViewerState(v: unknown): v is ViewerState;
59
- export declare function validateViewerState(v: unknown): ValidationResult;
60
- export interface MyState {
61
- follow?: string;
62
- muted?: boolean;
63
- [k: string]: unknown;
64
- }
65
- export declare function isMyState(v: unknown): v is MyState;
66
- export declare function validateMyState(v: unknown): ValidationResult;
@@ -0,0 +1,22 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import * as AppBskyActorDefs from './defs';
3
+ export interface QueryParams {
4
+ term?: string;
5
+ limit?: number;
6
+ cursor?: string;
7
+ }
8
+ export declare type InputSchema = undefined;
9
+ export interface OutputSchema {
10
+ cursor?: string;
11
+ actors: AppBskyActorDefs.ProfileView[];
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;
@@ -0,0 +1,20 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import * as AppBskyActorDefs from './defs';
3
+ export interface QueryParams {
4
+ term?: string;
5
+ limit?: number;
6
+ }
7
+ export declare type InputSchema = undefined;
8
+ export interface OutputSchema {
9
+ actors: AppBskyActorDefs.ProfileViewBasic[];
10
+ [k: string]: unknown;
11
+ }
12
+ export interface CallOptions {
13
+ headers?: Headers;
14
+ }
15
+ export interface Response {
16
+ success: boolean;
17
+ headers: Headers;
18
+ data: OutputSchema;
19
+ }
20
+ export declare function toKnownErr(e: any): any;
@@ -0,0 +1,24 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ import * as AppBskyEmbedRecord from './record';
3
+ import * as AppBskyEmbedImages from './images';
4
+ import * as AppBskyEmbedExternal from './external';
5
+ export interface Main {
6
+ record: AppBskyEmbedRecord.Main;
7
+ media: AppBskyEmbedImages.Main | AppBskyEmbedExternal.Main | {
8
+ $type: string;
9
+ [k: string]: unknown;
10
+ };
11
+ [k: string]: unknown;
12
+ }
13
+ export declare function isMain(v: unknown): v is Main;
14
+ export declare function validateMain(v: unknown): ValidationResult;
15
+ export interface View {
16
+ record: AppBskyEmbedRecord.View;
17
+ media: AppBskyEmbedImages.View | AppBskyEmbedExternal.View | {
18
+ $type: string;
19
+ [k: string]: unknown;
20
+ };
21
+ [k: string]: unknown;
22
+ }
23
+ export declare function isView(v: unknown): v is View;
24
+ export declare function validateView(v: unknown): ValidationResult;
@@ -1,4 +1,4 @@
1
- import { ValidationResult } from '@atproto/lexicon';
1
+ import { ValidationResult, BlobRef } from '@atproto/lexicon';
2
2
  export interface Main {
3
3
  external: External;
4
4
  [k: string]: unknown;
@@ -9,27 +9,23 @@ export interface External {
9
9
  uri: string;
10
10
  title: string;
11
11
  description: string;
12
- thumb?: {
13
- cid: string;
14
- mimeType: string;
15
- [k: string]: unknown;
16
- };
12
+ thumb?: BlobRef;
17
13
  [k: string]: unknown;
18
14
  }
19
15
  export declare function isExternal(v: unknown): v is External;
20
16
  export declare function validateExternal(v: unknown): ValidationResult;
21
- export interface Presented {
22
- external: PresentedExternal;
17
+ export interface View {
18
+ external: ViewExternal;
23
19
  [k: string]: unknown;
24
20
  }
25
- export declare function isPresented(v: unknown): v is Presented;
26
- export declare function validatePresented(v: unknown): ValidationResult;
27
- export interface PresentedExternal {
21
+ export declare function isView(v: unknown): v is View;
22
+ export declare function validateView(v: unknown): ValidationResult;
23
+ export interface ViewExternal {
28
24
  uri: string;
29
25
  title: string;
30
26
  description: string;
31
27
  thumb?: string;
32
28
  [k: string]: unknown;
33
29
  }
34
- export declare function isPresentedExternal(v: unknown): v is PresentedExternal;
35
- export declare function validatePresentedExternal(v: unknown): ValidationResult;
30
+ export declare function isViewExternal(v: unknown): v is ViewExternal;
31
+ export declare function validateViewExternal(v: unknown): ValidationResult;
@@ -1,4 +1,4 @@
1
- import { ValidationResult } from '@atproto/lexicon';
1
+ import { ValidationResult, BlobRef } from '@atproto/lexicon';
2
2
  export interface Main {
3
3
  images: Image[];
4
4
  [k: string]: unknown;
@@ -6,27 +6,23 @@ export interface Main {
6
6
  export declare function isMain(v: unknown): v is Main;
7
7
  export declare function validateMain(v: unknown): ValidationResult;
8
8
  export interface Image {
9
- image: {
10
- cid: string;
11
- mimeType: string;
12
- [k: string]: unknown;
13
- };
9
+ image: BlobRef;
14
10
  alt: string;
15
11
  [k: string]: unknown;
16
12
  }
17
13
  export declare function isImage(v: unknown): v is Image;
18
14
  export declare function validateImage(v: unknown): ValidationResult;
19
- export interface Presented {
20
- images: PresentedImage[];
15
+ export interface View {
16
+ images: ViewImage[];
21
17
  [k: string]: unknown;
22
18
  }
23
- export declare function isPresented(v: unknown): v is Presented;
24
- export declare function validatePresented(v: unknown): ValidationResult;
25
- export interface PresentedImage {
19
+ export declare function isView(v: unknown): v is View;
20
+ export declare function validateView(v: unknown): ValidationResult;
21
+ export interface ViewImage {
26
22
  thumb: string;
27
23
  fullsize: string;
28
24
  alt: string;
29
25
  [k: string]: unknown;
30
26
  }
31
- export declare function isPresentedImage(v: unknown): v is PresentedImage;
32
- export declare function validatePresentedImage(v: unknown): ValidationResult;
27
+ export declare function isViewImage(v: unknown): v is ViewImage;
28
+ export declare function validateViewImage(v: unknown): ValidationResult;
@@ -0,0 +1,33 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
3
+ import * as AppBskyActorRef from '../actor/ref';
4
+ export interface Main {
5
+ post: ComAtprotoRepoStrongRef.Main;
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 Presented {
11
+ post: PresentedPost | PresentedNotFound | {
12
+ $type: string;
13
+ [k: string]: unknown;
14
+ };
15
+ [k: string]: unknown;
16
+ }
17
+ export declare function isPresented(v: unknown): v is Presented;
18
+ export declare function validatePresented(v: unknown): ValidationResult;
19
+ export interface PresentedPost {
20
+ uri: string;
21
+ cid: string;
22
+ author: AppBskyActorRef.WithInfo;
23
+ record: {};
24
+ [k: string]: unknown;
25
+ }
26
+ export declare function isPresentedPost(v: unknown): v is PresentedPost;
27
+ export declare function validatePresentedPost(v: unknown): ValidationResult;
28
+ export interface PresentedNotFound {
29
+ uri: string;
30
+ [k: string]: unknown;
31
+ }
32
+ export declare function isPresentedNotFound(v: unknown): v is PresentedNotFound;
33
+ export declare function validatePresentedNotFound(v: unknown): ValidationResult;
@@ -1,33 +1,41 @@
1
1
  import { ValidationResult } from '@atproto/lexicon';
2
2
  import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
3
- import * as AppBskyActorRef from '../actor/ref';
3
+ import * as AppBskyActorDefs from '../actor/defs';
4
+ import * as AppBskyEmbedImages from './images';
5
+ import * as AppBskyEmbedExternal from './external';
6
+ import * as AppBskyEmbedRecordWithMedia from './recordWithMedia';
4
7
  export interface Main {
5
8
  record: ComAtprotoRepoStrongRef.Main;
6
9
  [k: string]: unknown;
7
10
  }
8
11
  export declare function isMain(v: unknown): v is Main;
9
12
  export declare function validateMain(v: unknown): ValidationResult;
10
- export interface Presented {
11
- record: PresentedRecord | PresentedNotFound | {
13
+ export interface View {
14
+ record: ViewRecord | ViewNotFound | {
12
15
  $type: string;
13
16
  [k: string]: unknown;
14
17
  };
15
18
  [k: string]: unknown;
16
19
  }
17
- export declare function isPresented(v: unknown): v is Presented;
18
- export declare function validatePresented(v: unknown): ValidationResult;
19
- export interface PresentedRecord {
20
+ export declare function isView(v: unknown): v is View;
21
+ export declare function validateView(v: unknown): ValidationResult;
22
+ export interface ViewRecord {
20
23
  uri: string;
21
24
  cid: string;
22
- author: AppBskyActorRef.WithInfo;
23
- record: {};
25
+ author: AppBskyActorDefs.ProfileViewBasic;
26
+ value: {};
27
+ embeds?: (AppBskyEmbedImages.View | AppBskyEmbedExternal.View | View | AppBskyEmbedRecordWithMedia.View | {
28
+ $type: string;
29
+ [k: string]: unknown;
30
+ })[];
31
+ indexedAt: string;
24
32
  [k: string]: unknown;
25
33
  }
26
- export declare function isPresentedRecord(v: unknown): v is PresentedRecord;
27
- export declare function validatePresentedRecord(v: unknown): ValidationResult;
28
- export interface PresentedNotFound {
34
+ export declare function isViewRecord(v: unknown): v is ViewRecord;
35
+ export declare function validateViewRecord(v: unknown): ValidationResult;
36
+ export interface ViewNotFound {
29
37
  uri: string;
30
38
  [k: string]: unknown;
31
39
  }
32
- export declare function isPresentedNotFound(v: unknown): v is PresentedNotFound;
33
- export declare function validatePresentedNotFound(v: unknown): ValidationResult;
40
+ export declare function isViewNotFound(v: unknown): v is ViewNotFound;
41
+ export declare function validateViewNotFound(v: unknown): ValidationResult;
@@ -0,0 +1,24 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ import * as AppBskyEmbedRecord from './record';
3
+ import * as AppBskyEmbedImages from './images';
4
+ import * as AppBskyEmbedExternal from './external';
5
+ export interface Main {
6
+ record: AppBskyEmbedRecord.Main;
7
+ media: AppBskyEmbedImages.Main | AppBskyEmbedExternal.Main | {
8
+ $type: string;
9
+ [k: string]: unknown;
10
+ };
11
+ [k: string]: unknown;
12
+ }
13
+ export declare function isMain(v: unknown): v is Main;
14
+ export declare function validateMain(v: unknown): ValidationResult;
15
+ export interface View {
16
+ record: AppBskyEmbedRecord.View;
17
+ media: AppBskyEmbedImages.View | AppBskyEmbedExternal.View | {
18
+ $type: string;
19
+ [k: string]: unknown;
20
+ };
21
+ [k: string]: unknown;
22
+ }
23
+ export declare function isView(v: unknown): v is View;
24
+ export declare function validateView(v: unknown): ValidationResult;
@@ -0,0 +1,77 @@
1
+ import { ValidationResult } from '@atproto/lexicon';
2
+ import * as AppBskyActorDefs from '../actor/defs';
3
+ import * as AppBskyEmbedImages from '../embed/images';
4
+ import * as AppBskyEmbedExternal from '../embed/external';
5
+ import * as AppBskyEmbedRecord from '../embed/record';
6
+ import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia';
7
+ export interface PostView {
8
+ uri: string;
9
+ cid: string;
10
+ author: AppBskyActorDefs.ProfileViewBasic;
11
+ record: {};
12
+ embed?: AppBskyEmbedImages.View | AppBskyEmbedExternal.View | AppBskyEmbedRecord.View | AppBskyEmbedRecordWithMedia.View | {
13
+ $type: string;
14
+ [k: string]: unknown;
15
+ };
16
+ replyCount?: number;
17
+ repostCount?: number;
18
+ likeCount?: number;
19
+ indexedAt: string;
20
+ viewer?: ViewerState;
21
+ [k: string]: unknown;
22
+ }
23
+ export declare function isPostView(v: unknown): v is PostView;
24
+ export declare function validatePostView(v: unknown): ValidationResult;
25
+ export interface ViewerState {
26
+ repost?: string;
27
+ like?: string;
28
+ [k: string]: unknown;
29
+ }
30
+ export declare function isViewerState(v: unknown): v is ViewerState;
31
+ export declare function validateViewerState(v: unknown): ValidationResult;
32
+ export interface FeedViewPost {
33
+ post: PostView;
34
+ reply?: ReplyRef;
35
+ reason?: ReasonRepost | {
36
+ $type: string;
37
+ [k: string]: unknown;
38
+ };
39
+ [k: string]: unknown;
40
+ }
41
+ export declare function isFeedViewPost(v: unknown): v is FeedViewPost;
42
+ export declare function validateFeedViewPost(v: unknown): ValidationResult;
43
+ export interface ReplyRef {
44
+ root: PostView;
45
+ parent: PostView;
46
+ [k: string]: unknown;
47
+ }
48
+ export declare function isReplyRef(v: unknown): v is ReplyRef;
49
+ export declare function validateReplyRef(v: unknown): ValidationResult;
50
+ export interface ReasonRepost {
51
+ by: AppBskyActorDefs.ProfileViewBasic;
52
+ indexedAt: string;
53
+ [k: string]: unknown;
54
+ }
55
+ export declare function isReasonRepost(v: unknown): v is ReasonRepost;
56
+ export declare function validateReasonRepost(v: unknown): ValidationResult;
57
+ export interface ThreadViewPost {
58
+ post: PostView;
59
+ parent?: ThreadViewPost | NotFoundPost | {
60
+ $type: string;
61
+ [k: string]: unknown;
62
+ };
63
+ replies?: (ThreadViewPost | NotFoundPost | {
64
+ $type: string;
65
+ [k: string]: unknown;
66
+ })[];
67
+ [k: string]: unknown;
68
+ }
69
+ export declare function isThreadViewPost(v: unknown): v is ThreadViewPost;
70
+ export declare function validateThreadViewPost(v: unknown): ValidationResult;
71
+ export interface NotFoundPost {
72
+ uri: string;
73
+ notFound: true;
74
+ [k: string]: unknown;
75
+ }
76
+ export declare function isNotFoundPost(v: unknown): v is NotFoundPost;
77
+ export declare function validateNotFoundPost(v: unknown): ValidationResult;
@@ -1,14 +1,14 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
- import * as AppBskyFeedFeedViewPost from './feedViewPost';
2
+ import * as AppBskyFeedDefs from './defs';
3
3
  export interface QueryParams {
4
- author: string;
4
+ actor: string;
5
5
  limit?: number;
6
- before?: string;
6
+ cursor?: string;
7
7
  }
8
8
  export declare type InputSchema = undefined;
9
9
  export interface OutputSchema {
10
10
  cursor?: string;
11
- feed: AppBskyFeedFeedViewPost.Main[];
11
+ feed: AppBskyFeedDefs.FeedViewPost[];
12
12
  [k: string]: unknown;
13
13
  }
14
14
  export interface CallOptions {
@@ -1,17 +1,18 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
2
  import { ValidationResult } from '@atproto/lexicon';
3
- import * as AppBskyActorRef from '../actor/ref';
4
- import * as AppBskySystemDeclRef from '../system/declRef';
3
+ import * as AppBskyActorDefs from '../actor/defs';
5
4
  export interface QueryParams {
6
- actor: string;
5
+ uri: string;
6
+ cid?: string;
7
7
  limit?: number;
8
- before?: string;
8
+ cursor?: string;
9
9
  }
10
10
  export declare type InputSchema = undefined;
11
11
  export interface OutputSchema {
12
- subject: AppBskyActorRef.WithInfo;
12
+ uri: string;
13
+ cid?: string;
13
14
  cursor?: string;
14
- members: Member[];
15
+ likes: Like[];
15
16
  [k: string]: unknown;
16
17
  }
17
18
  export interface CallOptions {
@@ -23,14 +24,11 @@ export interface Response {
23
24
  data: OutputSchema;
24
25
  }
25
26
  export declare function toKnownErr(e: any): any;
26
- export interface Member {
27
- did: string;
28
- declaration: AppBskySystemDeclRef.Main;
29
- handle: string;
30
- displayName?: string;
31
- createdAt?: string;
27
+ export interface Like {
32
28
  indexedAt: string;
29
+ createdAt: string;
30
+ actor: AppBskyActorDefs.ProfileView;
33
31
  [k: string]: unknown;
34
32
  }
35
- export declare function isMember(v: unknown): v is Member;
36
- export declare function validateMember(v: unknown): ValidationResult;
33
+ export declare function isLike(v: unknown): v is Like;
34
+ export declare function validateLike(v: unknown): ValidationResult;
@@ -1,13 +1,12 @@
1
1
  import { Headers, XRPCError } from '@atproto/xrpc';
2
- import { ValidationResult } from '@atproto/lexicon';
3
- import * as AppBskyFeedPost from './post';
2
+ import * as AppBskyFeedDefs from './defs';
4
3
  export interface QueryParams {
5
4
  uri: string;
6
5
  depth?: number;
7
6
  }
8
7
  export declare type InputSchema = undefined;
9
8
  export interface OutputSchema {
10
- thread: ThreadViewPost | NotFoundPost | {
9
+ thread: AppBskyFeedDefs.ThreadViewPost | AppBskyFeedDefs.NotFoundPost | {
11
10
  $type: string;
12
11
  [k: string]: unknown;
13
12
  };
@@ -25,24 +24,3 @@ export declare class NotFoundError extends XRPCError {
25
24
  constructor(src: XRPCError);
26
25
  }
27
26
  export declare function toKnownErr(e: any): any;
28
- export interface ThreadViewPost {
29
- post: AppBskyFeedPost.View;
30
- parent?: ThreadViewPost | NotFoundPost | {
31
- $type: string;
32
- [k: string]: unknown;
33
- };
34
- replies?: (ThreadViewPost | NotFoundPost | {
35
- $type: string;
36
- [k: string]: unknown;
37
- })[];
38
- [k: string]: unknown;
39
- }
40
- export declare function isThreadViewPost(v: unknown): v is ThreadViewPost;
41
- export declare function validateThreadViewPost(v: unknown): ValidationResult;
42
- export interface NotFoundPost {
43
- uri: string;
44
- notFound: true;
45
- [k: string]: unknown;
46
- }
47
- export declare function isNotFoundPost(v: unknown): v is NotFoundPost;
48
- export declare function validateNotFoundPost(v: unknown): ValidationResult;
@@ -1,17 +1,17 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
- import * as AppBskyActorRef from '../actor/ref';
2
+ import * as AppBskyActorDefs from '../actor/defs';
3
3
  export interface QueryParams {
4
4
  uri: string;
5
5
  cid?: string;
6
6
  limit?: number;
7
- before?: string;
7
+ cursor?: string;
8
8
  }
9
9
  export declare type InputSchema = undefined;
10
10
  export interface OutputSchema {
11
11
  uri: string;
12
12
  cid?: string;
13
13
  cursor?: string;
14
- repostedBy: AppBskyActorRef.WithInfo[];
14
+ repostedBy: AppBskyActorDefs.ProfileView[];
15
15
  [k: string]: unknown;
16
16
  }
17
17
  export interface CallOptions {
@@ -1,14 +1,14 @@
1
1
  import { Headers } from '@atproto/xrpc';
2
- import * as AppBskyFeedFeedViewPost from './feedViewPost';
2
+ import * as AppBskyFeedDefs from './defs';
3
3
  export interface QueryParams {
4
4
  algorithm?: string;
5
5
  limit?: number;
6
- before?: string;
6
+ cursor?: string;
7
7
  }
8
8
  export declare type InputSchema = undefined;
9
9
  export interface OutputSchema {
10
10
  cursor?: string;
11
- feed: AppBskyFeedFeedViewPost.Main[];
11
+ feed: AppBskyFeedDefs.FeedViewPost[];
12
12
  [k: string]: unknown;
13
13
  }
14
14
  export interface CallOptions {