@atproto/api 0.0.8 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,7 @@ import * as ComAtprotoAccountGet from './types/com/atproto/account/get'
13
13
  import * as ComAtprotoAccountRequestDelete from './types/com/atproto/account/requestDelete'
14
14
  import * as ComAtprotoAccountRequestPasswordReset from './types/com/atproto/account/requestPasswordReset'
15
15
  import * as ComAtprotoAccountResetPassword from './types/com/atproto/account/resetPassword'
16
+ import * as ComAtprotoAdminBlob from './types/com/atproto/admin/blob'
16
17
  import * as ComAtprotoAdminGetModerationAction from './types/com/atproto/admin/getModerationAction'
17
18
  import * as ComAtprotoAdminGetModerationActions from './types/com/atproto/admin/getModerationActions'
18
19
  import * as ComAtprotoAdminGetModerationReport from './types/com/atproto/admin/getModerationReport'
@@ -95,6 +96,7 @@ export * as ComAtprotoAccountGet from './types/com/atproto/account/get'
95
96
  export * as ComAtprotoAccountRequestDelete from './types/com/atproto/account/requestDelete'
96
97
  export * as ComAtprotoAccountRequestPasswordReset from './types/com/atproto/account/requestPasswordReset'
97
98
  export * as ComAtprotoAccountResetPassword from './types/com/atproto/account/resetPassword'
99
+ export * as ComAtprotoAdminBlob from './types/com/atproto/admin/blob'
98
100
  export * as ComAtprotoAdminGetModerationAction from './types/com/atproto/admin/getModerationAction'
99
101
  export * as ComAtprotoAdminGetModerationActions from './types/com/atproto/admin/getModerationActions'
100
102
  export * as ComAtprotoAdminGetModerationReport from './types/com/atproto/admin/getModerationReport'
@@ -187,28 +189,25 @@ export const APP_BSKY_SYSTEM = {
187
189
  ActorUser: 'app.bsky.system.actorUser',
188
190
  }
189
191
 
190
- export class Client {
192
+ export class AtpBaseClient {
191
193
  xrpc: XrpcClient = new XrpcClient()
192
194
 
193
195
  constructor() {
194
196
  this.xrpc.addLexicons(schemas)
195
197
  }
196
198
 
197
- service(serviceUri: string | URL): ServiceClient {
198
- return new ServiceClient(this, this.xrpc.service(serviceUri))
199
+ service(serviceUri: string | URL): AtpServiceClient {
200
+ return new AtpServiceClient(this, this.xrpc.service(serviceUri))
199
201
  }
200
202
  }
201
203
 
202
- const defaultInst = new Client()
203
- export default defaultInst
204
-
205
- export class ServiceClient {
206
- _baseClient: Client
204
+ export class AtpServiceClient {
205
+ _baseClient: AtpBaseClient
207
206
  xrpc: XrpcServiceClient
208
207
  com: ComNS
209
208
  app: AppNS
210
209
 
211
- constructor(baseClient: Client, xrpcService: XrpcServiceClient) {
210
+ constructor(baseClient: AtpBaseClient, xrpcService: XrpcServiceClient) {
212
211
  this._baseClient = baseClient
213
212
  this.xrpc = xrpcService
214
213
  this.com = new ComNS(this)
@@ -221,17 +220,17 @@ export class ServiceClient {
221
220
  }
222
221
 
223
222
  export class ComNS {
224
- _service: ServiceClient
223
+ _service: AtpServiceClient
225
224
  atproto: AtprotoNS
226
225
 
227
- constructor(service: ServiceClient) {
226
+ constructor(service: AtpServiceClient) {
228
227
  this._service = service
229
228
  this.atproto = new AtprotoNS(service)
230
229
  }
231
230
  }
232
231
 
233
232
  export class AtprotoNS {
234
- _service: ServiceClient
233
+ _service: AtpServiceClient
235
234
  account: AccountNS
236
235
  admin: AdminNS
237
236
  blob: BlobNS
@@ -242,7 +241,7 @@ export class AtprotoNS {
242
241
  session: SessionNS
243
242
  sync: SyncNS
244
243
 
245
- constructor(service: ServiceClient) {
244
+ constructor(service: AtpServiceClient) {
246
245
  this._service = service
247
246
  this.account = new AccountNS(service)
248
247
  this.admin = new AdminNS(service)
@@ -257,9 +256,9 @@ export class AtprotoNS {
257
256
  }
258
257
 
259
258
  export class AccountNS {
260
- _service: ServiceClient
259
+ _service: AtpServiceClient
261
260
 
262
- constructor(service: ServiceClient) {
261
+ constructor(service: AtpServiceClient) {
263
262
  this._service = service
264
263
  }
265
264
 
@@ -342,9 +341,9 @@ export class AccountNS {
342
341
  }
343
342
 
344
343
  export class AdminNS {
345
- _service: ServiceClient
344
+ _service: AtpServiceClient
346
345
 
347
- constructor(service: ServiceClient) {
346
+ constructor(service: AtpServiceClient) {
348
347
  this._service = service
349
348
  }
350
349
 
@@ -460,9 +459,9 @@ export class AdminNS {
460
459
  }
461
460
 
462
461
  export class BlobNS {
463
- _service: ServiceClient
462
+ _service: AtpServiceClient
464
463
 
465
- constructor(service: ServiceClient) {
464
+ constructor(service: AtpServiceClient) {
466
465
  this._service = service
467
466
  }
468
467
 
@@ -479,9 +478,9 @@ export class BlobNS {
479
478
  }
480
479
 
481
480
  export class HandleNS {
482
- _service: ServiceClient
481
+ _service: AtpServiceClient
483
482
 
484
- constructor(service: ServiceClient) {
483
+ constructor(service: AtpServiceClient) {
485
484
  this._service = service
486
485
  }
487
486
 
@@ -498,9 +497,9 @@ export class HandleNS {
498
497
  }
499
498
 
500
499
  export class RepoNS {
501
- _service: ServiceClient
500
+ _service: AtpServiceClient
502
501
 
503
- constructor(service: ServiceClient) {
502
+ constructor(service: AtpServiceClient) {
504
503
  this._service = service
505
504
  }
506
505
 
@@ -583,9 +582,9 @@ export class RepoNS {
583
582
  }
584
583
 
585
584
  export class ReportNS {
586
- _service: ServiceClient
585
+ _service: AtpServiceClient
587
586
 
588
- constructor(service: ServiceClient) {
587
+ constructor(service: AtpServiceClient) {
589
588
  this._service = service
590
589
  }
591
590
 
@@ -602,9 +601,9 @@ export class ReportNS {
602
601
  }
603
602
 
604
603
  export class ServerNS {
605
- _service: ServiceClient
604
+ _service: AtpServiceClient
606
605
 
607
- constructor(service: ServiceClient) {
606
+ constructor(service: AtpServiceClient) {
608
607
  this._service = service
609
608
  }
610
609
 
@@ -621,9 +620,9 @@ export class ServerNS {
621
620
  }
622
621
 
623
622
  export class SessionNS {
624
- _service: ServiceClient
623
+ _service: AtpServiceClient
625
624
 
626
- constructor(service: ServiceClient) {
625
+ constructor(service: AtpServiceClient) {
627
626
  this._service = service
628
627
  }
629
628
 
@@ -673,9 +672,9 @@ export class SessionNS {
673
672
  }
674
673
 
675
674
  export class SyncNS {
676
- _service: ServiceClient
675
+ _service: AtpServiceClient
677
676
 
678
- constructor(service: ServiceClient) {
677
+ constructor(service: AtpServiceClient) {
679
678
  this._service = service
680
679
  }
681
680
 
@@ -736,17 +735,17 @@ export class SyncNS {
736
735
  }
737
736
 
738
737
  export class AppNS {
739
- _service: ServiceClient
738
+ _service: AtpServiceClient
740
739
  bsky: BskyNS
741
740
 
742
- constructor(service: ServiceClient) {
741
+ constructor(service: AtpServiceClient) {
743
742
  this._service = service
744
743
  this.bsky = new BskyNS(service)
745
744
  }
746
745
  }
747
746
 
748
747
  export class BskyNS {
749
- _service: ServiceClient
748
+ _service: AtpServiceClient
750
749
  actor: ActorNS
751
750
  embed: EmbedNS
752
751
  feed: FeedNS
@@ -754,7 +753,7 @@ export class BskyNS {
754
753
  notification: NotificationNS
755
754
  system: SystemNS
756
755
 
757
- constructor(service: ServiceClient) {
756
+ constructor(service: AtpServiceClient) {
758
757
  this._service = service
759
758
  this.actor = new ActorNS(service)
760
759
  this.embed = new EmbedNS(service)
@@ -766,10 +765,10 @@ export class BskyNS {
766
765
  }
767
766
 
768
767
  export class ActorNS {
769
- _service: ServiceClient
768
+ _service: AtpServiceClient
770
769
  profile: ProfileRecord
771
770
 
772
- constructor(service: ServiceClient) {
771
+ constructor(service: AtpServiceClient) {
773
772
  this._service = service
774
773
  this.profile = new ProfileRecord(service)
775
774
  }
@@ -831,9 +830,9 @@ export class ActorNS {
831
830
  }
832
831
 
833
832
  export class ProfileRecord {
834
- _service: ServiceClient
833
+ _service: AtpServiceClient
835
834
 
836
- constructor(service: ServiceClient) {
835
+ constructor(service: AtpServiceClient) {
837
836
  this._service = service
838
837
  }
839
838
 
@@ -892,20 +891,20 @@ export class ProfileRecord {
892
891
  }
893
892
 
894
893
  export class EmbedNS {
895
- _service: ServiceClient
894
+ _service: AtpServiceClient
896
895
 
897
- constructor(service: ServiceClient) {
896
+ constructor(service: AtpServiceClient) {
898
897
  this._service = service
899
898
  }
900
899
  }
901
900
 
902
901
  export class FeedNS {
903
- _service: ServiceClient
902
+ _service: AtpServiceClient
904
903
  post: PostRecord
905
904
  repost: RepostRecord
906
905
  vote: VoteRecord
907
906
 
908
- constructor(service: ServiceClient) {
907
+ constructor(service: AtpServiceClient) {
909
908
  this._service = service
910
909
  this.post = new PostRecord(service)
911
910
  this.repost = new RepostRecord(service)
@@ -980,9 +979,9 @@ export class FeedNS {
980
979
  }
981
980
 
982
981
  export class PostRecord {
983
- _service: ServiceClient
982
+ _service: AtpServiceClient
984
983
 
985
- constructor(service: ServiceClient) {
984
+ constructor(service: AtpServiceClient) {
986
985
  this._service = service
987
986
  }
988
987
 
@@ -1041,9 +1040,9 @@ export class PostRecord {
1041
1040
  }
1042
1041
 
1043
1042
  export class RepostRecord {
1044
- _service: ServiceClient
1043
+ _service: AtpServiceClient
1045
1044
 
1046
- constructor(service: ServiceClient) {
1045
+ constructor(service: AtpServiceClient) {
1047
1046
  this._service = service
1048
1047
  }
1049
1048
 
@@ -1102,9 +1101,9 @@ export class RepostRecord {
1102
1101
  }
1103
1102
 
1104
1103
  export class VoteRecord {
1105
- _service: ServiceClient
1104
+ _service: AtpServiceClient
1106
1105
 
1107
- constructor(service: ServiceClient) {
1106
+ constructor(service: AtpServiceClient) {
1108
1107
  this._service = service
1109
1108
  }
1110
1109
 
@@ -1163,12 +1162,12 @@ export class VoteRecord {
1163
1162
  }
1164
1163
 
1165
1164
  export class GraphNS {
1166
- _service: ServiceClient
1165
+ _service: AtpServiceClient
1167
1166
  assertion: AssertionRecord
1168
1167
  confirmation: ConfirmationRecord
1169
1168
  follow: FollowRecord
1170
1169
 
1171
- constructor(service: ServiceClient) {
1170
+ constructor(service: AtpServiceClient) {
1172
1171
  this._service = service
1173
1172
  this.assertion = new AssertionRecord(service)
1174
1173
  this.confirmation = new ConfirmationRecord(service)
@@ -1232,9 +1231,9 @@ export class GraphNS {
1232
1231
  }
1233
1232
 
1234
1233
  export class AssertionRecord {
1235
- _service: ServiceClient
1234
+ _service: AtpServiceClient
1236
1235
 
1237
- constructor(service: ServiceClient) {
1236
+ constructor(service: AtpServiceClient) {
1238
1237
  this._service = service
1239
1238
  }
1240
1239
 
@@ -1297,9 +1296,9 @@ export class AssertionRecord {
1297
1296
  }
1298
1297
 
1299
1298
  export class ConfirmationRecord {
1300
- _service: ServiceClient
1299
+ _service: AtpServiceClient
1301
1300
 
1302
- constructor(service: ServiceClient) {
1301
+ constructor(service: AtpServiceClient) {
1303
1302
  this._service = service
1304
1303
  }
1305
1304
 
@@ -1362,9 +1361,9 @@ export class ConfirmationRecord {
1362
1361
  }
1363
1362
 
1364
1363
  export class FollowRecord {
1365
- _service: ServiceClient
1364
+ _service: AtpServiceClient
1366
1365
 
1367
- constructor(service: ServiceClient) {
1366
+ constructor(service: AtpServiceClient) {
1368
1367
  this._service = service
1369
1368
  }
1370
1369
 
@@ -1423,9 +1422,9 @@ export class FollowRecord {
1423
1422
  }
1424
1423
 
1425
1424
  export class NotificationNS {
1426
- _service: ServiceClient
1425
+ _service: AtpServiceClient
1427
1426
 
1428
- constructor(service: ServiceClient) {
1427
+ constructor(service: AtpServiceClient) {
1429
1428
  this._service = service
1430
1429
  }
1431
1430
 
@@ -1464,19 +1463,19 @@ export class NotificationNS {
1464
1463
  }
1465
1464
 
1466
1465
  export class SystemNS {
1467
- _service: ServiceClient
1466
+ _service: AtpServiceClient
1468
1467
  declaration: DeclarationRecord
1469
1468
 
1470
- constructor(service: ServiceClient) {
1469
+ constructor(service: AtpServiceClient) {
1471
1470
  this._service = service
1472
1471
  this.declaration = new DeclarationRecord(service)
1473
1472
  }
1474
1473
  }
1475
1474
 
1476
1475
  export class DeclarationRecord {
1477
- _service: ServiceClient
1476
+ _service: AtpServiceClient
1478
1477
 
1479
- constructor(service: ServiceClient) {
1478
+ constructor(service: AtpServiceClient) {
1480
1479
  this._service = service
1481
1480
  }
1482
1481