@atproto/api 0.2.5 → 0.2.6

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 (163) hide show
  1. package/dist/client/index.d.ts +19 -0
  2. package/dist/client/lexicons.d.ts +364 -7
  3. package/dist/client/types/app/bsky/actor/defs.d.ts +4 -0
  4. package/dist/client/types/app/bsky/feed/defs.d.ts +2 -0
  5. package/dist/client/types/app/bsky/notification/listNotifications.d.ts +2 -0
  6. package/dist/client/types/com/atproto/admin/defs.d.ts +4 -1
  7. package/dist/client/types/com/atproto/admin/takeModerationAction.d.ts +2 -0
  8. package/dist/client/types/com/atproto/{handle/update.d.ts → admin/updateAccountHandle.d.ts} +1 -0
  9. package/dist/client/types/com/atproto/label/defs.d.ts +12 -0
  10. package/dist/client/types/{app/bsky/feed/getAuthorFeed.d.ts → com/atproto/label/queryLabels.d.ts} +4 -3
  11. package/dist/client/types/com/atproto/label/subscribeLabels.d.ts +16 -0
  12. package/dist/client/types/com/atproto/{account/createInviteCode.d.ts → server/createInviteCodes.d.ts} +3 -1
  13. package/dist/client/types/com/atproto/server/createSession.d.ts +1 -1
  14. package/dist/client/types/{app/bsky/actor/getSuggestions.d.ts → com/atproto/sync/listRepos.d.ts} +9 -2
  15. package/dist/index.js +674 -229
  16. package/dist/index.js.map +4 -4
  17. package/package.json +1 -1
  18. package/src/client/index.ts +66 -0
  19. package/src/client/lexicons.ts +377 -10
  20. package/src/client/types/app/bsky/actor/defs.ts +4 -0
  21. package/src/client/types/app/bsky/feed/defs.ts +2 -0
  22. package/src/client/types/app/bsky/notification/listNotifications.ts +2 -0
  23. package/src/client/types/com/atproto/admin/defs.ts +4 -1
  24. package/src/client/types/com/atproto/admin/takeModerationAction.ts +2 -0
  25. package/src/client/types/com/atproto/admin/updateAccountHandle.ts +33 -0
  26. package/src/client/types/com/atproto/label/defs.ts +36 -0
  27. package/src/client/types/com/atproto/label/queryLabels.ts +42 -0
  28. package/src/client/types/com/atproto/label/subscribeLabels.ts +45 -0
  29. package/src/client/types/com/atproto/repo/listRecords.ts +2 -2
  30. package/src/client/types/com/atproto/server/createInviteCodes.ts +40 -0
  31. package/src/client/types/com/atproto/server/createSession.ts +1 -1
  32. package/src/client/types/com/atproto/sync/listRepos.ts +55 -0
  33. package/tsconfig.build.tsbuildinfo +1 -1
  34. package/dist/agent.d.ts +0 -27
  35. package/dist/bsky-agent.d.ts +0 -43
  36. package/dist/client/types/app/bsky/actor/createScene.d.ts +0 -32
  37. package/dist/client/types/app/bsky/actor/getProfile.d.ts +0 -16
  38. package/dist/client/types/app/bsky/actor/getProfiles.d.ts +0 -19
  39. package/dist/client/types/app/bsky/actor/profile.d.ts +0 -10
  40. package/dist/client/types/app/bsky/actor/ref.d.ts +0 -28
  41. package/dist/client/types/app/bsky/actor/search.d.ts +0 -22
  42. package/dist/client/types/app/bsky/actor/searchActors.d.ts +0 -22
  43. package/dist/client/types/app/bsky/actor/searchActorsTypeahead.d.ts +0 -20
  44. package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +0 -20
  45. package/dist/client/types/app/bsky/actor/updateProfile.d.ts +0 -40
  46. package/dist/client/types/app/bsky/embed/external.d.ts +0 -31
  47. package/dist/client/types/app/bsky/embed/images.d.ts +0 -28
  48. package/dist/client/types/app/bsky/embed/record.d.ts +0 -41
  49. package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts +0 -24
  50. package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +0 -28
  51. package/dist/client/types/app/bsky/feed/getLikes.d.ts +0 -34
  52. package/dist/client/types/app/bsky/feed/getPostThread.d.ts +0 -26
  53. package/dist/client/types/app/bsky/feed/getRepostedBy.d.ts +0 -25
  54. package/dist/client/types/app/bsky/feed/getTimeline.d.ts +0 -22
  55. package/dist/client/types/app/bsky/feed/getVotes.d.ts +0 -36
  56. package/dist/client/types/app/bsky/feed/like.d.ts +0 -9
  57. package/dist/client/types/app/bsky/feed/post.d.ts +0 -43
  58. package/dist/client/types/app/bsky/feed/repost.d.ts +0 -9
  59. package/dist/client/types/app/bsky/feed/setVote.d.ts +0 -25
  60. package/dist/client/types/app/bsky/feed/trend.d.ts +0 -9
  61. package/dist/client/types/app/bsky/feed/vote.d.ts +0 -10
  62. package/dist/client/types/app/bsky/graph/assertCreator.d.ts +0 -1
  63. package/dist/client/types/app/bsky/graph/assertMember.d.ts +0 -1
  64. package/dist/client/types/app/bsky/graph/assertion.d.ts +0 -10
  65. package/dist/client/types/app/bsky/graph/confirmation.d.ts +0 -11
  66. package/dist/client/types/app/bsky/graph/follow.d.ts +0 -8
  67. package/dist/client/types/app/bsky/graph/getAssertions.d.ts +0 -48
  68. package/dist/client/types/app/bsky/graph/getFollowers.d.ts +0 -23
  69. package/dist/client/types/app/bsky/graph/getFollows.d.ts +0 -23
  70. package/dist/client/types/app/bsky/graph/getMembers.d.ts +0 -36
  71. package/dist/client/types/app/bsky/graph/getMemberships.d.ts +0 -36
  72. package/dist/client/types/app/bsky/graph/getMutes.d.ts +0 -21
  73. package/dist/client/types/app/bsky/graph/mute.d.ts +0 -17
  74. package/dist/client/types/app/bsky/graph/muteActor.d.ts +0 -17
  75. package/dist/client/types/app/bsky/graph/unmute.d.ts +0 -17
  76. package/dist/client/types/app/bsky/graph/unmuteActor.d.ts +0 -17
  77. package/dist/client/types/app/bsky/notification/getCount.d.ts +0 -17
  78. package/dist/client/types/app/bsky/notification/getUnreadCount.d.ts +0 -17
  79. package/dist/client/types/app/bsky/notification/list.d.ts +0 -35
  80. package/dist/client/types/app/bsky/notification/updateSeen.d.ts +0 -17
  81. package/dist/client/types/app/bsky/richtext/facet.d.ts +0 -30
  82. package/dist/client/types/app/bsky/system/actorScene.d.ts +0 -1
  83. package/dist/client/types/app/bsky/system/actorUser.d.ts +0 -1
  84. package/dist/client/types/app/bsky/system/declRef.d.ts +0 -8
  85. package/dist/client/types/app/bsky/system/declaration.d.ts +0 -7
  86. package/dist/client/types/app/bsky/unspecced/getPopular.d.ts +0 -21
  87. package/dist/client/types/com/atproto/account/create.d.ts +0 -41
  88. package/dist/client/types/com/atproto/account/delete.d.ts +0 -25
  89. package/dist/client/types/com/atproto/account/get.d.ts +0 -12
  90. package/dist/client/types/com/atproto/account/requestDelete.d.ts +0 -13
  91. package/dist/client/types/com/atproto/account/requestPasswordReset.d.ts +0 -17
  92. package/dist/client/types/com/atproto/account/resetPassword.d.ts +0 -24
  93. package/dist/client/types/com/atproto/admin/blob.d.ts +0 -37
  94. package/dist/client/types/com/atproto/admin/getModerationAction.d.ts +0 -16
  95. package/dist/client/types/com/atproto/admin/getModerationActions.d.ts +0 -22
  96. package/dist/client/types/com/atproto/admin/getModerationReport.d.ts +0 -16
  97. package/dist/client/types/com/atproto/admin/getModerationReports.d.ts +0 -23
  98. package/dist/client/types/com/atproto/admin/getRecord.d.ts +0 -17
  99. package/dist/client/types/com/atproto/admin/getRepo.d.ts +0 -16
  100. package/dist/client/types/com/atproto/admin/moderationAction.d.ts +0 -60
  101. package/dist/client/types/com/atproto/admin/moderationReport.d.ts +0 -37
  102. package/dist/client/types/com/atproto/admin/record.d.ts +0 -43
  103. package/dist/client/types/com/atproto/admin/repo.d.ts +0 -45
  104. package/dist/client/types/com/atproto/admin/resolveModerationReports.d.ts +0 -22
  105. package/dist/client/types/com/atproto/admin/reverseModerationAction.d.ts +0 -22
  106. package/dist/client/types/com/atproto/blob/upload.d.ts +0 -19
  107. package/dist/client/types/com/atproto/handle/resolve.d.ts +0 -18
  108. package/dist/client/types/com/atproto/identity/resolveHandle.d.ts +0 -18
  109. package/dist/client/types/com/atproto/identity/updateHandle.d.ts +0 -17
  110. package/dist/client/types/com/atproto/moderation/createReport.d.ts +0 -38
  111. package/dist/client/types/com/atproto/moderation/defs.d.ts +0 -3
  112. package/dist/client/types/com/atproto/repo/applyWrites.d.ts +0 -47
  113. package/dist/client/types/com/atproto/repo/batchWrite.d.ts +0 -46
  114. package/dist/client/types/com/atproto/repo/createRecord.d.ts +0 -31
  115. package/dist/client/types/com/atproto/repo/deleteRecord.d.ts +0 -24
  116. package/dist/client/types/com/atproto/repo/describe.d.ts +0 -22
  117. package/dist/client/types/com/atproto/repo/describeRepo.d.ts +0 -22
  118. package/dist/client/types/com/atproto/repo/getRecord.d.ts +0 -23
  119. package/dist/client/types/com/atproto/repo/putRecord.d.ts +0 -32
  120. package/dist/client/types/com/atproto/repo/recordRef.d.ts +0 -8
  121. package/dist/client/types/com/atproto/repo/repoRef.d.ts +0 -7
  122. package/dist/client/types/com/atproto/repo/strongRef.d.ts +0 -8
  123. package/dist/client/types/com/atproto/repo/uploadBlob.d.ts +0 -20
  124. package/dist/client/types/com/atproto/report/create.d.ts +0 -39
  125. package/dist/client/types/com/atproto/report/reasonType.d.ts +0 -3
  126. package/dist/client/types/com/atproto/report/subject.d.ts +0 -23
  127. package/dist/client/types/com/atproto/server/createAccount.d.ts +0 -44
  128. package/dist/client/types/com/atproto/server/deleteAccount.d.ts +0 -25
  129. package/dist/client/types/com/atproto/server/deleteSession.d.ts +0 -13
  130. package/dist/client/types/com/atproto/server/describeServer.d.ts +0 -27
  131. package/dist/client/types/com/atproto/server/getAccountsConfig.d.ts +0 -27
  132. package/dist/client/types/com/atproto/server/refreshSession.d.ts +0 -24
  133. package/dist/client/types/com/atproto/server/requestAccountDelete.d.ts +0 -13
  134. package/dist/client/types/com/atproto/server/requestPasswordReset.d.ts +0 -17
  135. package/dist/client/types/com/atproto/server/resetPassword.d.ts +0 -24
  136. package/dist/client/types/com/atproto/session/create.d.ts +0 -29
  137. package/dist/client/types/com/atproto/session/delete.d.ts +0 -13
  138. package/dist/client/types/com/atproto/session/get.d.ts +0 -18
  139. package/dist/client/types/com/atproto/session/refresh.d.ts +0 -24
  140. package/dist/client/types/com/atproto/sync/getBlob.d.ts +0 -15
  141. package/dist/client/types/com/atproto/sync/getBlocks.d.ts +0 -15
  142. package/dist/client/types/com/atproto/sync/getCheckout.d.ts +0 -15
  143. package/dist/client/types/com/atproto/sync/getCommitPath.d.ts +0 -20
  144. package/dist/client/types/com/atproto/sync/getHead.d.ts +0 -18
  145. package/dist/client/types/com/atproto/sync/getRecord.d.ts +0 -17
  146. package/dist/client/types/com/atproto/sync/getRepo.d.ts +0 -16
  147. package/dist/client/types/com/atproto/sync/getRoot.d.ts +0 -18
  148. package/dist/client/types/com/atproto/sync/listBlobs.d.ts +0 -20
  149. package/dist/client/types/com/atproto/sync/notifyOfUpdate.d.ts +0 -13
  150. package/dist/client/types/com/atproto/sync/requestCrawl.d.ts +0 -13
  151. package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +0 -9
  152. package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +0 -58
  153. package/dist/client/types/com/atproto/sync/updateRepo.d.ts +0 -15
  154. package/dist/client/util.d.ts +0 -2
  155. package/dist/helpers/bsky.d.ts +0 -20
  156. package/dist/index.d.ts +0 -10
  157. package/dist/mixins/bsky.d.ts +0 -23
  158. package/dist/rich-text/detection.d.ts +0 -4
  159. package/dist/rich-text/rich-text.d.ts +0 -39
  160. package/dist/rich-text/sanitization.d.ts +0 -4
  161. package/dist/rich-text/sanitize.d.ts +0 -4
  162. package/dist/rich-text/unicode.d.ts +0 -11
  163. package/dist/session.d.ts +0 -42
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "codegen": "lex gen-api ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/*",
@@ -20,8 +20,12 @@ import * as ComAtprotoAdminResolveModerationReports from './types/com/atproto/ad
20
20
  import * as ComAtprotoAdminReverseModerationAction from './types/com/atproto/admin/reverseModerationAction'
21
21
  import * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRepos'
22
22
  import * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction'
23
+ import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
23
24
  import * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle'
24
25
  import * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle'
26
+ import * as ComAtprotoLabelDefs from './types/com/atproto/label/defs'
27
+ import * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels'
28
+ import * as ComAtprotoLabelSubscribeLabels from './types/com/atproto/label/subscribeLabels'
25
29
  import * as ComAtprotoModerationCreateReport from './types/com/atproto/moderation/createReport'
26
30
  import * as ComAtprotoModerationDefs from './types/com/atproto/moderation/defs'
27
31
  import * as ComAtprotoRepoApplyWrites from './types/com/atproto/repo/applyWrites'
@@ -35,6 +39,7 @@ import * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef'
35
39
  import * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob'
36
40
  import * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount'
37
41
  import * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode'
42
+ import * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes'
38
43
  import * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession'
39
44
  import * as ComAtprotoServerDefs from './types/com/atproto/server/defs'
40
45
  import * as ComAtprotoServerDeleteAccount from './types/com/atproto/server/deleteAccount'
@@ -54,6 +59,7 @@ import * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead'
54
59
  import * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord'
55
60
  import * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo'
56
61
  import * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs'
62
+ import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos'
57
63
  import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'
58
64
  import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'
59
65
  import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'
@@ -102,8 +108,12 @@ export * as ComAtprotoAdminResolveModerationReports from './types/com/atproto/ad
102
108
  export * as ComAtprotoAdminReverseModerationAction from './types/com/atproto/admin/reverseModerationAction'
103
109
  export * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRepos'
104
110
  export * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction'
111
+ export * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
105
112
  export * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle'
106
113
  export * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle'
114
+ export * as ComAtprotoLabelDefs from './types/com/atproto/label/defs'
115
+ export * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels'
116
+ export * as ComAtprotoLabelSubscribeLabels from './types/com/atproto/label/subscribeLabels'
107
117
  export * as ComAtprotoModerationCreateReport from './types/com/atproto/moderation/createReport'
108
118
  export * as ComAtprotoModerationDefs from './types/com/atproto/moderation/defs'
109
119
  export * as ComAtprotoRepoApplyWrites from './types/com/atproto/repo/applyWrites'
@@ -117,6 +127,7 @@ export * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef'
117
127
  export * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob'
118
128
  export * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount'
119
129
  export * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode'
130
+ export * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes'
120
131
  export * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession'
121
132
  export * as ComAtprotoServerDefs from './types/com/atproto/server/defs'
122
133
  export * as ComAtprotoServerDeleteAccount from './types/com/atproto/server/deleteAccount'
@@ -136,6 +147,7 @@ export * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead'
136
147
  export * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord'
137
148
  export * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo'
138
149
  export * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs'
150
+ export * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos'
139
151
  export * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'
140
152
  export * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'
141
153
  export * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'
@@ -225,6 +237,7 @@ export class AtprotoNS {
225
237
  _service: AtpServiceClient
226
238
  admin: AdminNS
227
239
  identity: IdentityNS
240
+ label: LabelNS
228
241
  moderation: ModerationNS
229
242
  repo: RepoNS
230
243
  server: ServerNS
@@ -234,6 +247,7 @@ export class AtprotoNS {
234
247
  this._service = service
235
248
  this.admin = new AdminNS(service)
236
249
  this.identity = new IdentityNS(service)
250
+ this.label = new LabelNS(service)
237
251
  this.moderation = new ModerationNS(service)
238
252
  this.repo = new RepoNS(service)
239
253
  this.server = new ServerNS(service)
@@ -379,6 +393,17 @@ export class AdminNS {
379
393
  throw ComAtprotoAdminTakeModerationAction.toKnownErr(e)
380
394
  })
381
395
  }
396
+
397
+ updateAccountHandle(
398
+ data?: ComAtprotoAdminUpdateAccountHandle.InputSchema,
399
+ opts?: ComAtprotoAdminUpdateAccountHandle.CallOptions,
400
+ ): Promise<ComAtprotoAdminUpdateAccountHandle.Response> {
401
+ return this._service.xrpc
402
+ .call('com.atproto.admin.updateAccountHandle', opts?.qp, data, opts)
403
+ .catch((e) => {
404
+ throw ComAtprotoAdminUpdateAccountHandle.toKnownErr(e)
405
+ })
406
+ }
382
407
  }
383
408
 
384
409
  export class IdentityNS {
@@ -411,6 +436,25 @@ export class IdentityNS {
411
436
  }
412
437
  }
413
438
 
439
+ export class LabelNS {
440
+ _service: AtpServiceClient
441
+
442
+ constructor(service: AtpServiceClient) {
443
+ this._service = service
444
+ }
445
+
446
+ queryLabels(
447
+ params?: ComAtprotoLabelQueryLabels.QueryParams,
448
+ opts?: ComAtprotoLabelQueryLabels.CallOptions,
449
+ ): Promise<ComAtprotoLabelQueryLabels.Response> {
450
+ return this._service.xrpc
451
+ .call('com.atproto.label.queryLabels', params, undefined, opts)
452
+ .catch((e) => {
453
+ throw ComAtprotoLabelQueryLabels.toKnownErr(e)
454
+ })
455
+ }
456
+ }
457
+
414
458
  export class ModerationNS {
415
459
  _service: AtpServiceClient
416
460
 
@@ -555,6 +599,17 @@ export class ServerNS {
555
599
  })
556
600
  }
557
601
 
602
+ createInviteCodes(
603
+ data?: ComAtprotoServerCreateInviteCodes.InputSchema,
604
+ opts?: ComAtprotoServerCreateInviteCodes.CallOptions,
605
+ ): Promise<ComAtprotoServerCreateInviteCodes.Response> {
606
+ return this._service.xrpc
607
+ .call('com.atproto.server.createInviteCodes', opts?.qp, data, opts)
608
+ .catch((e) => {
609
+ throw ComAtprotoServerCreateInviteCodes.toKnownErr(e)
610
+ })
611
+ }
612
+
558
613
  createSession(
559
614
  data?: ComAtprotoServerCreateSession.InputSchema,
560
615
  opts?: ComAtprotoServerCreateSession.CallOptions,
@@ -761,6 +816,17 @@ export class SyncNS {
761
816
  })
762
817
  }
763
818
 
819
+ listRepos(
820
+ params?: ComAtprotoSyncListRepos.QueryParams,
821
+ opts?: ComAtprotoSyncListRepos.CallOptions,
822
+ ): Promise<ComAtprotoSyncListRepos.Response> {
823
+ return this._service.xrpc
824
+ .call('com.atproto.sync.listRepos', params, undefined, opts)
825
+ .catch((e) => {
826
+ throw ComAtprotoSyncListRepos.toKnownErr(e)
827
+ })
828
+ }
829
+
764
830
  notifyOfUpdate(
765
831
  params?: ComAtprotoSyncNotifyOfUpdate.QueryParams,
766
832
  opts?: ComAtprotoSyncNotifyOfUpdate.CallOptions,
@@ -41,6 +41,18 @@ export const schemaDict = {
41
41
  type: 'string',
42
42
  },
43
43
  },
44
+ createLabelVals: {
45
+ type: 'array',
46
+ items: {
47
+ type: 'string',
48
+ },
49
+ },
50
+ negateLabelVals: {
51
+ type: 'array',
52
+ items: {
53
+ type: 'string',
54
+ },
55
+ },
44
56
  reason: {
45
57
  type: 'string',
46
58
  },
@@ -98,6 +110,18 @@ export const schemaDict = {
98
110
  ref: 'lex:com.atproto.admin.defs#blobView',
99
111
  },
100
112
  },
113
+ createLabelVals: {
114
+ type: 'array',
115
+ items: {
116
+ type: 'string',
117
+ },
118
+ },
119
+ negateLabelVals: {
120
+ type: 'array',
121
+ items: {
122
+ type: 'string',
123
+ },
124
+ },
101
125
  reason: {
102
126
  type: 'string',
103
127
  },
@@ -303,13 +327,6 @@ export const schemaDict = {
303
327
  type: 'ref',
304
328
  ref: 'lex:com.atproto.server.defs#inviteCode',
305
329
  },
306
- invites: {
307
- type: 'array',
308
- items: {
309
- type: 'ref',
310
- ref: 'lex:com.atproto.server.defs#inviteCode',
311
- },
312
- },
313
330
  },
314
331
  },
315
332
  repoViewDetail: {
@@ -995,6 +1012,18 @@ export const schemaDict = {
995
1012
  format: 'cid',
996
1013
  },
997
1014
  },
1015
+ createLabelVals: {
1016
+ type: 'array',
1017
+ items: {
1018
+ type: 'string',
1019
+ },
1020
+ },
1021
+ negateLabelVals: {
1022
+ type: 'array',
1023
+ items: {
1024
+ type: 'string',
1025
+ },
1026
+ },
998
1027
  reason: {
999
1028
  type: 'string',
1000
1029
  },
@@ -1020,6 +1049,33 @@ export const schemaDict = {
1020
1049
  },
1021
1050
  },
1022
1051
  },
1052
+ ComAtprotoAdminUpdateAccountHandle: {
1053
+ lexicon: 1,
1054
+ id: 'com.atproto.admin.updateAccountHandle',
1055
+ defs: {
1056
+ main: {
1057
+ type: 'procedure',
1058
+ description: 'Administrative action to update an accounts handle',
1059
+ input: {
1060
+ encoding: 'application/json',
1061
+ schema: {
1062
+ type: 'object',
1063
+ required: ['did', 'handle'],
1064
+ properties: {
1065
+ did: {
1066
+ type: 'string',
1067
+ format: 'did',
1068
+ },
1069
+ handle: {
1070
+ type: 'string',
1071
+ format: 'handle',
1072
+ },
1073
+ },
1074
+ },
1075
+ },
1076
+ },
1077
+ },
1078
+ },
1023
1079
  ComAtprotoIdentityResolveHandle: {
1024
1080
  lexicon: 1,
1025
1081
  id: 'com.atproto.identity.resolveHandle',
@@ -1077,6 +1133,174 @@ export const schemaDict = {
1077
1133
  },
1078
1134
  },
1079
1135
  },
1136
+ ComAtprotoLabelDefs: {
1137
+ lexicon: 1,
1138
+ id: 'com.atproto.label.defs',
1139
+ defs: {
1140
+ label: {
1141
+ type: 'object',
1142
+ description: 'Metadata tag on an atproto resource (eg, repo or record)',
1143
+ required: ['src', 'uri', 'val', 'cts'],
1144
+ properties: {
1145
+ src: {
1146
+ type: 'string',
1147
+ format: 'did',
1148
+ description: 'DID of the actor who created this label',
1149
+ },
1150
+ uri: {
1151
+ type: 'string',
1152
+ format: 'uri',
1153
+ description:
1154
+ 'AT URI of the record, repository (account), or other resource which this label applies to',
1155
+ },
1156
+ cid: {
1157
+ type: 'string',
1158
+ format: 'cid',
1159
+ description:
1160
+ "optionally, CID specifying the specific version of 'uri' resource this label applies to",
1161
+ },
1162
+ val: {
1163
+ type: 'string',
1164
+ maxLength: 128,
1165
+ description:
1166
+ 'the short string name of the value or type of this label',
1167
+ },
1168
+ neg: {
1169
+ type: 'boolean',
1170
+ description:
1171
+ 'if true, this is a negation label, overwriting a previous label',
1172
+ },
1173
+ cts: {
1174
+ type: 'string',
1175
+ format: 'datetime',
1176
+ description: 'timestamp when this label was created',
1177
+ },
1178
+ },
1179
+ },
1180
+ },
1181
+ },
1182
+ ComAtprotoLabelQueryLabels: {
1183
+ lexicon: 1,
1184
+ id: 'com.atproto.label.queryLabels',
1185
+ defs: {
1186
+ main: {
1187
+ type: 'query',
1188
+ description: 'Find labels relevant to the provided URI patterns.',
1189
+ parameters: {
1190
+ type: 'params',
1191
+ required: ['uriPatterns'],
1192
+ properties: {
1193
+ uriPatterns: {
1194
+ type: 'array',
1195
+ items: {
1196
+ type: 'string',
1197
+ },
1198
+ description:
1199
+ "List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI",
1200
+ },
1201
+ sources: {
1202
+ type: 'array',
1203
+ items: {
1204
+ type: 'string',
1205
+ format: 'did',
1206
+ },
1207
+ description: 'Optional list of label sources (DIDs) to filter on',
1208
+ },
1209
+ limit: {
1210
+ type: 'integer',
1211
+ minimum: 1,
1212
+ maximum: 250,
1213
+ default: 50,
1214
+ },
1215
+ cursor: {
1216
+ type: 'string',
1217
+ },
1218
+ },
1219
+ },
1220
+ output: {
1221
+ encoding: 'application/json',
1222
+ schema: {
1223
+ type: 'object',
1224
+ required: ['labels'],
1225
+ properties: {
1226
+ cursor: {
1227
+ type: 'string',
1228
+ },
1229
+ labels: {
1230
+ type: 'array',
1231
+ items: {
1232
+ type: 'ref',
1233
+ ref: 'lex:com.atproto.label.defs#label',
1234
+ },
1235
+ },
1236
+ },
1237
+ },
1238
+ },
1239
+ },
1240
+ },
1241
+ },
1242
+ ComAtprotoLabelSubscribeLabels: {
1243
+ lexicon: 1,
1244
+ id: 'com.atproto.label.subscribeLabels',
1245
+ defs: {
1246
+ main: {
1247
+ type: 'subscription',
1248
+ description: 'Subscribe to label updates',
1249
+ parameters: {
1250
+ type: 'params',
1251
+ properties: {
1252
+ cursor: {
1253
+ type: 'integer',
1254
+ description: 'The last known event to backfill from.',
1255
+ },
1256
+ },
1257
+ },
1258
+ message: {
1259
+ schema: {
1260
+ type: 'union',
1261
+ refs: [
1262
+ 'lex:com.atproto.label.subscribeLabels#labels',
1263
+ 'lex:com.atproto.label.subscribeLabels#info',
1264
+ ],
1265
+ },
1266
+ },
1267
+ errors: [
1268
+ {
1269
+ name: 'FutureCursor',
1270
+ },
1271
+ ],
1272
+ },
1273
+ labels: {
1274
+ type: 'object',
1275
+ required: ['seq', 'labels'],
1276
+ properties: {
1277
+ seq: {
1278
+ type: 'integer',
1279
+ },
1280
+ labels: {
1281
+ type: 'array',
1282
+ items: {
1283
+ type: 'ref',
1284
+ ref: 'lex:com.atproto.label.defs#label',
1285
+ },
1286
+ },
1287
+ },
1288
+ },
1289
+ info: {
1290
+ type: 'object',
1291
+ required: ['name'],
1292
+ properties: {
1293
+ name: {
1294
+ type: 'string',
1295
+ knownValues: ['OutdatedCursor'],
1296
+ },
1297
+ message: {
1298
+ type: 'string',
1299
+ },
1300
+ },
1301
+ },
1302
+ },
1303
+ },
1080
1304
  ComAtprotoModerationCreateReport: {
1081
1305
  lexicon: 1,
1082
1306
  id: 'com.atproto.moderation.createReport',
@@ -1538,12 +1762,12 @@ export const schemaDict = {
1538
1762
  rkeyStart: {
1539
1763
  type: 'string',
1540
1764
  description:
1541
- 'The lowest sort-ordered rkey to start from (exclusive)',
1765
+ 'DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)',
1542
1766
  },
1543
1767
  rkeyEnd: {
1544
1768
  type: 'string',
1545
1769
  description:
1546
- 'The highest sort-ordered rkey to stop at (exclusive)',
1770
+ 'DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)',
1547
1771
  },
1548
1772
  reverse: {
1549
1773
  type: 'boolean',
@@ -1827,6 +2051,51 @@ export const schemaDict = {
1827
2051
  },
1828
2052
  },
1829
2053
  },
2054
+ ComAtprotoServerCreateInviteCodes: {
2055
+ lexicon: 1,
2056
+ id: 'com.atproto.server.createInviteCodes',
2057
+ defs: {
2058
+ main: {
2059
+ type: 'procedure',
2060
+ description: 'Create an invite code.',
2061
+ input: {
2062
+ encoding: 'application/json',
2063
+ schema: {
2064
+ type: 'object',
2065
+ required: ['codeCount', 'useCount'],
2066
+ properties: {
2067
+ codeCount: {
2068
+ type: 'integer',
2069
+ default: 1,
2070
+ },
2071
+ useCount: {
2072
+ type: 'integer',
2073
+ },
2074
+ forAccount: {
2075
+ type: 'string',
2076
+ format: 'did',
2077
+ },
2078
+ },
2079
+ },
2080
+ },
2081
+ output: {
2082
+ encoding: 'application/json',
2083
+ schema: {
2084
+ type: 'object',
2085
+ required: ['codes'],
2086
+ properties: {
2087
+ codes: {
2088
+ type: 'array',
2089
+ items: {
2090
+ type: 'string',
2091
+ },
2092
+ },
2093
+ },
2094
+ },
2095
+ },
2096
+ },
2097
+ },
2098
+ },
1830
2099
  ComAtprotoServerCreateSession: {
1831
2100
  lexicon: 1,
1832
2101
  id: 'com.atproto.server.createSession',
@@ -1838,7 +2107,7 @@ export const schemaDict = {
1838
2107
  encoding: 'application/json',
1839
2108
  schema: {
1840
2109
  type: 'object',
1841
- required: ['password'],
2110
+ required: ['identifier', 'password'],
1842
2111
  properties: {
1843
2112
  identifier: {
1844
2113
  type: 'string',
@@ -2504,6 +2773,63 @@ export const schemaDict = {
2504
2773
  },
2505
2774
  },
2506
2775
  },
2776
+ ComAtprotoSyncListRepos: {
2777
+ lexicon: 1,
2778
+ id: 'com.atproto.sync.listRepos',
2779
+ defs: {
2780
+ main: {
2781
+ type: 'query',
2782
+ description: 'List dids and root cids of hosted repos',
2783
+ parameters: {
2784
+ type: 'params',
2785
+ properties: {
2786
+ limit: {
2787
+ type: 'integer',
2788
+ minimum: 1,
2789
+ maximum: 1000,
2790
+ default: 500,
2791
+ },
2792
+ cursor: {
2793
+ type: 'string',
2794
+ },
2795
+ },
2796
+ },
2797
+ output: {
2798
+ encoding: 'application/json',
2799
+ schema: {
2800
+ type: 'object',
2801
+ required: ['repos'],
2802
+ properties: {
2803
+ cursor: {
2804
+ type: 'string',
2805
+ },
2806
+ repos: {
2807
+ type: 'array',
2808
+ items: {
2809
+ type: 'ref',
2810
+ ref: 'lex:com.atproto.sync.listRepos#repo',
2811
+ },
2812
+ },
2813
+ },
2814
+ },
2815
+ },
2816
+ },
2817
+ repo: {
2818
+ type: 'object',
2819
+ required: ['did', 'head'],
2820
+ properties: {
2821
+ did: {
2822
+ type: 'string',
2823
+ format: 'did',
2824
+ },
2825
+ head: {
2826
+ type: 'string',
2827
+ format: 'cid',
2828
+ },
2829
+ },
2830
+ },
2831
+ },
2832
+ },
2507
2833
  ComAtprotoSyncNotifyOfUpdate: {
2508
2834
  lexicon: 1,
2509
2835
  id: 'com.atproto.sync.notifyOfUpdate',
@@ -2761,6 +3087,13 @@ export const schemaDict = {
2761
3087
  type: 'ref',
2762
3088
  ref: 'lex:app.bsky.actor.defs#viewerState',
2763
3089
  },
3090
+ labels: {
3091
+ type: 'array',
3092
+ items: {
3093
+ type: 'ref',
3094
+ ref: 'lex:com.atproto.label.defs#label',
3095
+ },
3096
+ },
2764
3097
  },
2765
3098
  },
2766
3099
  profileView: {
@@ -2796,6 +3129,13 @@ export const schemaDict = {
2796
3129
  type: 'ref',
2797
3130
  ref: 'lex:app.bsky.actor.defs#viewerState',
2798
3131
  },
3132
+ labels: {
3133
+ type: 'array',
3134
+ items: {
3135
+ type: 'ref',
3136
+ ref: 'lex:com.atproto.label.defs#label',
3137
+ },
3138
+ },
2799
3139
  },
2800
3140
  },
2801
3141
  profileViewDetailed: {
@@ -2843,6 +3183,13 @@ export const schemaDict = {
2843
3183
  type: 'ref',
2844
3184
  ref: 'lex:app.bsky.actor.defs#viewerState',
2845
3185
  },
3186
+ labels: {
3187
+ type: 'array',
3188
+ items: {
3189
+ type: 'ref',
3190
+ ref: 'lex:com.atproto.label.defs#label',
3191
+ },
3192
+ },
2846
3193
  },
2847
3194
  },
2848
3195
  viewerState: {
@@ -3391,6 +3738,13 @@ export const schemaDict = {
3391
3738
  type: 'ref',
3392
3739
  ref: 'lex:app.bsky.feed.defs#viewerState',
3393
3740
  },
3741
+ labels: {
3742
+ type: 'array',
3743
+ items: {
3744
+ type: 'ref',
3745
+ ref: 'lex:com.atproto.label.defs#label',
3746
+ },
3747
+ },
3394
3748
  },
3395
3749
  },
3396
3750
  viewerState: {
@@ -4247,6 +4601,13 @@ export const schemaDict = {
4247
4601
  type: 'string',
4248
4602
  format: 'datetime',
4249
4603
  },
4604
+ labels: {
4605
+ type: 'array',
4606
+ items: {
4607
+ type: 'ref',
4608
+ ref: 'lex:com.atproto.label.defs#label',
4609
+ },
4610
+ },
4250
4611
  },
4251
4612
  },
4252
4613
  },
@@ -4400,8 +4761,12 @@ export const ids = {
4400
4761
  'com.atproto.admin.reverseModerationAction',
4401
4762
  ComAtprotoAdminSearchRepos: 'com.atproto.admin.searchRepos',
4402
4763
  ComAtprotoAdminTakeModerationAction: 'com.atproto.admin.takeModerationAction',
4764
+ ComAtprotoAdminUpdateAccountHandle: 'com.atproto.admin.updateAccountHandle',
4403
4765
  ComAtprotoIdentityResolveHandle: 'com.atproto.identity.resolveHandle',
4404
4766
  ComAtprotoIdentityUpdateHandle: 'com.atproto.identity.updateHandle',
4767
+ ComAtprotoLabelDefs: 'com.atproto.label.defs',
4768
+ ComAtprotoLabelQueryLabels: 'com.atproto.label.queryLabels',
4769
+ ComAtprotoLabelSubscribeLabels: 'com.atproto.label.subscribeLabels',
4405
4770
  ComAtprotoModerationCreateReport: 'com.atproto.moderation.createReport',
4406
4771
  ComAtprotoModerationDefs: 'com.atproto.moderation.defs',
4407
4772
  ComAtprotoRepoApplyWrites: 'com.atproto.repo.applyWrites',
@@ -4415,6 +4780,7 @@ export const ids = {
4415
4780
  ComAtprotoRepoUploadBlob: 'com.atproto.repo.uploadBlob',
4416
4781
  ComAtprotoServerCreateAccount: 'com.atproto.server.createAccount',
4417
4782
  ComAtprotoServerCreateInviteCode: 'com.atproto.server.createInviteCode',
4783
+ ComAtprotoServerCreateInviteCodes: 'com.atproto.server.createInviteCodes',
4418
4784
  ComAtprotoServerCreateSession: 'com.atproto.server.createSession',
4419
4785
  ComAtprotoServerDefs: 'com.atproto.server.defs',
4420
4786
  ComAtprotoServerDeleteAccount: 'com.atproto.server.deleteAccount',
@@ -4437,6 +4803,7 @@ export const ids = {
4437
4803
  ComAtprotoSyncGetRecord: 'com.atproto.sync.getRecord',
4438
4804
  ComAtprotoSyncGetRepo: 'com.atproto.sync.getRepo',
4439
4805
  ComAtprotoSyncListBlobs: 'com.atproto.sync.listBlobs',
4806
+ ComAtprotoSyncListRepos: 'com.atproto.sync.listRepos',
4440
4807
  ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate',
4441
4808
  ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl',
4442
4809
  ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos',
@@ -5,6 +5,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon'
5
5
  import { isObj, hasProp } from '../../../../util'
6
6
  import { lexicons } from '../../../../lexicons'
7
7
  import { CID } from 'multiformats/cid'
8
+ import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
8
9
 
9
10
  export interface ProfileViewBasic {
10
11
  did: string
@@ -12,6 +13,7 @@ export interface ProfileViewBasic {
12
13
  displayName?: string
13
14
  avatar?: string
14
15
  viewer?: ViewerState
16
+ labels?: ComAtprotoLabelDefs.Label[]
15
17
  [k: string]: unknown
16
18
  }
17
19
 
@@ -35,6 +37,7 @@ export interface ProfileView {
35
37
  avatar?: string
36
38
  indexedAt?: string
37
39
  viewer?: ViewerState
40
+ labels?: ComAtprotoLabelDefs.Label[]
38
41
  [k: string]: unknown
39
42
  }
40
43
 
@@ -62,6 +65,7 @@ export interface ProfileViewDetailed {
62
65
  postsCount?: number
63
66
  indexedAt?: string
64
67
  viewer?: ViewerState
68
+ labels?: ComAtprotoLabelDefs.Label[]
65
69
  [k: string]: unknown
66
70
  }
67
71