@atproto/bsky 0.0.124 → 0.0.125

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 (113) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/api/app/bsky/notification/listNotifications.d.ts +7 -0
  3. package/dist/api/app/bsky/notification/listNotifications.d.ts.map +1 -1
  4. package/dist/api/app/bsky/notification/listNotifications.js +21 -5
  5. package/dist/api/app/bsky/notification/listNotifications.js.map +1 -1
  6. package/dist/config.d.ts +6 -0
  7. package/dist/config.d.ts.map +1 -1
  8. package/dist/config.js +24 -15
  9. package/dist/config.js.map +1 -1
  10. package/dist/context.d.ts +6 -1
  11. package/dist/context.d.ts.map +1 -1
  12. package/dist/context.js +6 -0
  13. package/dist/context.js.map +1 -1
  14. package/dist/data-plane/client/hosts.d.ts +37 -0
  15. package/dist/data-plane/client/hosts.d.ts.map +1 -0
  16. package/dist/data-plane/client/hosts.js +106 -0
  17. package/dist/data-plane/client/hosts.js.map +1 -0
  18. package/dist/data-plane/client/index.d.ts +13 -0
  19. package/dist/data-plane/client/index.d.ts.map +1 -0
  20. package/dist/data-plane/client/index.js +133 -0
  21. package/dist/data-plane/client/index.js.map +1 -0
  22. package/dist/data-plane/{client.d.ts → client/util.d.ts} +3 -10
  23. package/dist/data-plane/client/util.d.ts.map +1 -0
  24. package/dist/data-plane/client/util.js +85 -0
  25. package/dist/data-plane/client/util.js.map +1 -0
  26. package/dist/data-plane/server/db/pagination.d.ts +69 -9
  27. package/dist/data-plane/server/db/pagination.d.ts.map +1 -1
  28. package/dist/data-plane/server/db/pagination.js +114 -14
  29. package/dist/data-plane/server/db/pagination.js.map +1 -1
  30. package/dist/data-plane/server/routes/notifs.d.ts.map +1 -1
  31. package/dist/data-plane/server/routes/notifs.js +3 -5
  32. package/dist/data-plane/server/routes/notifs.js.map +1 -1
  33. package/dist/etcd.d.ts +25 -0
  34. package/dist/etcd.d.ts.map +1 -0
  35. package/dist/etcd.js +109 -0
  36. package/dist/etcd.js.map +1 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +14 -1
  39. package/dist/index.js.map +1 -1
  40. package/dist/lexicon/index.d.ts +6 -0
  41. package/dist/lexicon/index.d.ts.map +1 -1
  42. package/dist/lexicon/index.js +12 -0
  43. package/dist/lexicon/index.js.map +1 -1
  44. package/dist/lexicon/lexicons.d.ts +304 -156
  45. package/dist/lexicon/lexicons.d.ts.map +1 -1
  46. package/dist/lexicon/lexicons.js +168 -80
  47. package/dist/lexicon/lexicons.js.map +1 -1
  48. package/dist/lexicon/types/app/bsky/embed/video.d.ts +1 -0
  49. package/dist/lexicon/types/app/bsky/embed/video.d.ts.map +1 -1
  50. package/dist/lexicon/types/app/bsky/embed/video.js.map +1 -1
  51. package/dist/lexicon/types/com/atproto/identity/defs.d.ts +17 -0
  52. package/dist/lexicon/types/com/atproto/identity/defs.d.ts.map +1 -0
  53. package/dist/lexicon/types/com/atproto/identity/defs.js +16 -0
  54. package/dist/lexicon/types/com/atproto/identity/defs.js.map +1 -0
  55. package/dist/lexicon/types/com/atproto/identity/refreshIdentity.d.ts +39 -0
  56. package/dist/lexicon/types/com/atproto/identity/refreshIdentity.d.ts.map +1 -0
  57. package/dist/lexicon/types/com/atproto/identity/refreshIdentity.js +7 -0
  58. package/dist/lexicon/types/com/atproto/identity/refreshIdentity.js.map +1 -0
  59. package/dist/lexicon/types/com/atproto/identity/resolveDid.d.ts +40 -0
  60. package/dist/lexicon/types/com/atproto/identity/resolveDid.d.ts.map +1 -0
  61. package/dist/lexicon/types/com/atproto/identity/resolveDid.js +7 -0
  62. package/dist/lexicon/types/com/atproto/identity/resolveDid.js.map +1 -0
  63. package/dist/lexicon/types/com/atproto/identity/resolveHandle.d.ts +1 -0
  64. package/dist/lexicon/types/com/atproto/identity/resolveHandle.d.ts.map +1 -1
  65. package/dist/lexicon/types/com/atproto/identity/resolveIdentity.d.ts +36 -0
  66. package/dist/lexicon/types/com/atproto/identity/resolveIdentity.d.ts.map +1 -0
  67. package/dist/lexicon/types/com/atproto/identity/resolveIdentity.js +7 -0
  68. package/dist/lexicon/types/com/atproto/identity/resolveIdentity.js.map +1 -0
  69. package/dist/lexicon/types/com/atproto/repo/listRecords.d.ts +0 -4
  70. package/dist/lexicon/types/com/atproto/repo/listRecords.d.ts.map +1 -1
  71. package/dist/lexicon/types/com/atproto/repo/listRecords.js.map +1 -1
  72. package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts +0 -2
  73. package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts.map +1 -1
  74. package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts +1 -30
  75. package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
  76. package/dist/lexicon/types/com/atproto/sync/subscribeRepos.js +0 -27
  77. package/dist/lexicon/types/com/atproto/sync/subscribeRepos.js.map +1 -1
  78. package/dist/logger.d.ts +1 -0
  79. package/dist/logger.d.ts.map +1 -1
  80. package/dist/logger.js +2 -1
  81. package/dist/logger.js.map +1 -1
  82. package/package.json +16 -15
  83. package/src/api/app/bsky/notification/listNotifications.ts +28 -6
  84. package/src/config.ts +45 -15
  85. package/src/context.ts +12 -1
  86. package/src/data-plane/client/hosts.ts +103 -0
  87. package/src/data-plane/client/index.ts +123 -0
  88. package/src/data-plane/client/util.ts +66 -0
  89. package/src/data-plane/server/db/pagination.ts +158 -35
  90. package/src/data-plane/server/routes/notifs.ts +4 -9
  91. package/src/etcd.ts +90 -0
  92. package/src/index.ts +26 -2
  93. package/src/lexicon/index.ts +36 -0
  94. package/src/lexicon/lexicons.ts +183 -83
  95. package/src/lexicon/types/app/bsky/embed/video.ts +1 -0
  96. package/src/lexicon/types/com/atproto/identity/defs.ts +30 -0
  97. package/src/lexicon/types/com/atproto/identity/refreshIdentity.ts +52 -0
  98. package/src/lexicon/types/com/atproto/identity/resolveDid.ts +52 -0
  99. package/src/lexicon/types/com/atproto/identity/resolveHandle.ts +1 -0
  100. package/src/lexicon/types/com/atproto/identity/resolveIdentity.ts +48 -0
  101. package/src/lexicon/types/com/atproto/repo/listRecords.ts +0 -4
  102. package/src/lexicon/types/com/atproto/sync/getRecord.ts +0 -2
  103. package/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +0 -59
  104. package/src/logger.ts +2 -0
  105. package/tests/etcd.test.ts +301 -0
  106. package/tests/views/__snapshots__/notifications.test.ts.snap +3 -3
  107. package/tests/views/notifications.test.ts +190 -10
  108. package/tsconfig.build.tsbuildinfo +1 -1
  109. package/tsconfig.tests.tsbuildinfo +1 -1
  110. package/dist/data-plane/client.d.ts.map +0 -1
  111. package/dist/data-plane/client.js +0 -156
  112. package/dist/data-plane/client.js.map +0 -1
  113. package/src/data-plane/client.ts +0 -154
@@ -637,6 +637,32 @@ export const schemaDict = {
637
637
  },
638
638
  },
639
639
  },
640
+ ComAtprotoIdentityDefs: {
641
+ lexicon: 1,
642
+ id: 'com.atproto.identity.defs',
643
+ defs: {
644
+ identityInfo: {
645
+ type: 'object',
646
+ required: ['did', 'handle', 'didDoc'],
647
+ properties: {
648
+ did: {
649
+ type: 'string',
650
+ format: 'did',
651
+ },
652
+ handle: {
653
+ type: 'string',
654
+ format: 'handle',
655
+ description:
656
+ "The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document.",
657
+ },
658
+ didDoc: {
659
+ type: 'unknown',
660
+ description: 'The complete DID document for the identity.',
661
+ },
662
+ },
663
+ },
664
+ },
665
+ },
640
666
  ComAtprotoIdentityGetRecommendedDidCredentials: {
641
667
  lexicon: 1,
642
668
  id: 'com.atproto.identity.getRecommendedDidCredentials',
@@ -676,6 +702,54 @@ export const schemaDict = {
676
702
  },
677
703
  },
678
704
  },
705
+ ComAtprotoIdentityRefreshIdentity: {
706
+ lexicon: 1,
707
+ id: 'com.atproto.identity.refreshIdentity',
708
+ defs: {
709
+ main: {
710
+ type: 'procedure',
711
+ description:
712
+ 'Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.',
713
+ input: {
714
+ encoding: 'application/json',
715
+ schema: {
716
+ type: 'object',
717
+ required: ['identifier'],
718
+ properties: {
719
+ identifier: {
720
+ type: 'string',
721
+ format: 'at-identifier',
722
+ },
723
+ },
724
+ },
725
+ },
726
+ output: {
727
+ encoding: 'application/json',
728
+ schema: {
729
+ type: 'ref',
730
+ ref: 'lex:com.atproto.identity.defs#identityInfo',
731
+ },
732
+ },
733
+ errors: [
734
+ {
735
+ name: 'HandleNotFound',
736
+ description:
737
+ 'The resolution process confirmed that the handle does not resolve to any DID.',
738
+ },
739
+ {
740
+ name: 'DidNotFound',
741
+ description:
742
+ 'The DID resolution process confirmed that there is no current DID.',
743
+ },
744
+ {
745
+ name: 'DidDeactivated',
746
+ description:
747
+ 'The DID previously existed, but has been deactivated.',
748
+ },
749
+ ],
750
+ },
751
+ },
752
+ },
679
753
  ComAtprotoIdentityRequestPlcOperationSignature: {
680
754
  lexicon: 1,
681
755
  id: 'com.atproto.identity.requestPlcOperationSignature',
@@ -687,13 +761,61 @@ export const schemaDict = {
687
761
  },
688
762
  },
689
763
  },
764
+ ComAtprotoIdentityResolveDid: {
765
+ lexicon: 1,
766
+ id: 'com.atproto.identity.resolveDid',
767
+ defs: {
768
+ main: {
769
+ type: 'query',
770
+ description:
771
+ 'Resolves DID to DID document. Does not bi-directionally verify handle.',
772
+ parameters: {
773
+ type: 'params',
774
+ required: ['did'],
775
+ properties: {
776
+ did: {
777
+ type: 'string',
778
+ format: 'did',
779
+ description: 'DID to resolve.',
780
+ },
781
+ },
782
+ },
783
+ output: {
784
+ encoding: 'application/json',
785
+ schema: {
786
+ type: 'object',
787
+ required: ['didDoc'],
788
+ properties: {
789
+ didDoc: {
790
+ type: 'unknown',
791
+ description: 'The complete DID document for the identity.',
792
+ },
793
+ },
794
+ },
795
+ },
796
+ errors: [
797
+ {
798
+ name: 'DidNotFound',
799
+ description:
800
+ 'The DID resolution process confirmed that there is no current DID.',
801
+ },
802
+ {
803
+ name: 'DidDeactivated',
804
+ description:
805
+ 'The DID previously existed, but has been deactivated.',
806
+ },
807
+ ],
808
+ },
809
+ },
810
+ },
690
811
  ComAtprotoIdentityResolveHandle: {
691
812
  lexicon: 1,
692
813
  id: 'com.atproto.identity.resolveHandle',
693
814
  defs: {
694
815
  main: {
695
816
  type: 'query',
696
- description: 'Resolves a handle (domain name) to a DID.',
817
+ description:
818
+ 'Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.',
697
819
  parameters: {
698
820
  type: 'params',
699
821
  required: ['handle'],
@@ -718,6 +840,59 @@ export const schemaDict = {
718
840
  },
719
841
  },
720
842
  },
843
+ errors: [
844
+ {
845
+ name: 'HandleNotFound',
846
+ description:
847
+ 'The resolution process confirmed that the handle does not resolve to any DID.',
848
+ },
849
+ ],
850
+ },
851
+ },
852
+ },
853
+ ComAtprotoIdentityResolveIdentity: {
854
+ lexicon: 1,
855
+ id: 'com.atproto.identity.resolveIdentity',
856
+ defs: {
857
+ main: {
858
+ type: 'query',
859
+ description:
860
+ 'Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).',
861
+ parameters: {
862
+ type: 'params',
863
+ required: ['identifier'],
864
+ properties: {
865
+ identifier: {
866
+ type: 'string',
867
+ format: 'at-identifier',
868
+ description: 'Handle or DID to resolve.',
869
+ },
870
+ },
871
+ },
872
+ output: {
873
+ encoding: 'application/json',
874
+ schema: {
875
+ type: 'ref',
876
+ ref: 'lex:com.atproto.identity.defs#identityInfo',
877
+ },
878
+ },
879
+ errors: [
880
+ {
881
+ name: 'HandleNotFound',
882
+ description:
883
+ 'The resolution process confirmed that the handle does not resolve to any DID.',
884
+ },
885
+ {
886
+ name: 'DidNotFound',
887
+ description:
888
+ 'The DID resolution process confirmed that there is no current DID.',
889
+ },
890
+ {
891
+ name: 'DidDeactivated',
892
+ description:
893
+ 'The DID previously existed, but has been deactivated.',
894
+ },
895
+ ],
721
896
  },
722
897
  },
723
898
  },
@@ -1860,16 +2035,6 @@ export const schemaDict = {
1860
2035
  cursor: {
1861
2036
  type: 'string',
1862
2037
  },
1863
- rkeyStart: {
1864
- type: 'string',
1865
- description:
1866
- 'DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)',
1867
- },
1868
- rkeyEnd: {
1869
- type: 'string',
1870
- description:
1871
- 'DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)',
1872
- },
1873
2038
  reverse: {
1874
2039
  type: 'boolean',
1875
2040
  description: 'Flag to reverse the order of the returned records.',
@@ -3410,12 +3575,6 @@ export const schemaDict = {
3410
3575
  description: 'Record Key',
3411
3576
  format: 'record-key',
3412
3577
  },
3413
- commit: {
3414
- type: 'string',
3415
- format: 'cid',
3416
- description:
3417
- 'DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit',
3418
- },
3419
3578
  },
3420
3579
  },
3421
3580
  output: {
@@ -3832,9 +3991,6 @@ export const schemaDict = {
3832
3991
  'lex:com.atproto.sync.subscribeRepos#sync',
3833
3992
  'lex:com.atproto.sync.subscribeRepos#identity',
3834
3993
  'lex:com.atproto.sync.subscribeRepos#account',
3835
- 'lex:com.atproto.sync.subscribeRepos#handle',
3836
- 'lex:com.atproto.sync.subscribeRepos#migrate',
3837
- 'lex:com.atproto.sync.subscribeRepos#tombstone',
3838
3994
  'lex:com.atproto.sync.subscribeRepos#info',
3839
3995
  ],
3840
3996
  },
@@ -4038,68 +4194,6 @@ export const schemaDict = {
4038
4194
  },
4039
4195
  },
4040
4196
  },
4041
- handle: {
4042
- type: 'object',
4043
- description: 'DEPRECATED -- Use #identity event instead',
4044
- required: ['seq', 'did', 'handle', 'time'],
4045
- properties: {
4046
- seq: {
4047
- type: 'integer',
4048
- },
4049
- did: {
4050
- type: 'string',
4051
- format: 'did',
4052
- },
4053
- handle: {
4054
- type: 'string',
4055
- format: 'handle',
4056
- },
4057
- time: {
4058
- type: 'string',
4059
- format: 'datetime',
4060
- },
4061
- },
4062
- },
4063
- migrate: {
4064
- type: 'object',
4065
- description: 'DEPRECATED -- Use #account event instead',
4066
- required: ['seq', 'did', 'migrateTo', 'time'],
4067
- nullable: ['migrateTo'],
4068
- properties: {
4069
- seq: {
4070
- type: 'integer',
4071
- },
4072
- did: {
4073
- type: 'string',
4074
- format: 'did',
4075
- },
4076
- migrateTo: {
4077
- type: 'string',
4078
- },
4079
- time: {
4080
- type: 'string',
4081
- format: 'datetime',
4082
- },
4083
- },
4084
- },
4085
- tombstone: {
4086
- type: 'object',
4087
- description: 'DEPRECATED -- Use #account event instead',
4088
- required: ['seq', 'did', 'time'],
4089
- properties: {
4090
- seq: {
4091
- type: 'integer',
4092
- },
4093
- did: {
4094
- type: 'string',
4095
- format: 'did',
4096
- },
4097
- time: {
4098
- type: 'string',
4099
- format: 'datetime',
4100
- },
4101
- },
4102
- },
4103
4197
  info: {
4104
4198
  type: 'object',
4105
4199
  required: ['name'],
@@ -5599,8 +5693,10 @@ export const schemaDict = {
5599
5693
  properties: {
5600
5694
  video: {
5601
5695
  type: 'blob',
5696
+ description:
5697
+ 'The mp4 video file. May be up to 100mb, formerly limited to 50mb.',
5602
5698
  accept: ['video/mp4'],
5603
- maxSize: 50000000,
5699
+ maxSize: 100000000,
5604
5700
  },
5605
5701
  captions: {
5606
5702
  type: 'array',
@@ -11364,11 +11460,15 @@ export const ids = {
11364
11460
  ComAtprotoAdminUpdateAccountPassword:
11365
11461
  'com.atproto.admin.updateAccountPassword',
11366
11462
  ComAtprotoAdminUpdateSubjectStatus: 'com.atproto.admin.updateSubjectStatus',
11463
+ ComAtprotoIdentityDefs: 'com.atproto.identity.defs',
11367
11464
  ComAtprotoIdentityGetRecommendedDidCredentials:
11368
11465
  'com.atproto.identity.getRecommendedDidCredentials',
11466
+ ComAtprotoIdentityRefreshIdentity: 'com.atproto.identity.refreshIdentity',
11369
11467
  ComAtprotoIdentityRequestPlcOperationSignature:
11370
11468
  'com.atproto.identity.requestPlcOperationSignature',
11469
+ ComAtprotoIdentityResolveDid: 'com.atproto.identity.resolveDid',
11371
11470
  ComAtprotoIdentityResolveHandle: 'com.atproto.identity.resolveHandle',
11471
+ ComAtprotoIdentityResolveIdentity: 'com.atproto.identity.resolveIdentity',
11372
11472
  ComAtprotoIdentitySignPlcOperation: 'com.atproto.identity.signPlcOperation',
11373
11473
  ComAtprotoIdentitySubmitPlcOperation:
11374
11474
  'com.atproto.identity.submitPlcOperation',
@@ -13,6 +13,7 @@ const id = 'app.bsky.embed.video'
13
13
 
14
14
  export interface Main {
15
15
  $type?: 'app.bsky.embed.video'
16
+ /** The mp4 video file. May be up to 100mb, formerly limited to 50mb. */
16
17
  video: BlobRef
17
18
  captions?: Caption[]
18
19
  /** Alt text description of the video, for accessibility. */
@@ -0,0 +1,30 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
8
+
9
+ const is$typed = _is$typed,
10
+ validate = _validate
11
+ const id = 'com.atproto.identity.defs'
12
+
13
+ export interface IdentityInfo {
14
+ $type?: 'com.atproto.identity.defs#identityInfo'
15
+ did: string
16
+ /** The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document. */
17
+ handle: string
18
+ /** The complete DID document for the identity. */
19
+ didDoc: { [_ in string]: unknown }
20
+ }
21
+
22
+ const hashIdentityInfo = 'identityInfo'
23
+
24
+ export function isIdentityInfo<V>(v: V) {
25
+ return is$typed(v, id, hashIdentityInfo)
26
+ }
27
+
28
+ export function validateIdentityInfo<V>(v: V) {
29
+ return validate<IdentityInfo & V>(v, id, hashIdentityInfo)
30
+ }
@@ -0,0 +1,52 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
9
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
+ import type * as ComAtprotoIdentityDefs from './defs.js'
11
+
12
+ const is$typed = _is$typed,
13
+ validate = _validate
14
+ const id = 'com.atproto.identity.refreshIdentity'
15
+
16
+ export interface QueryParams {}
17
+
18
+ export interface InputSchema {
19
+ identifier: string
20
+ }
21
+
22
+ export type OutputSchema = ComAtprotoIdentityDefs.IdentityInfo
23
+
24
+ export interface HandlerInput {
25
+ encoding: 'application/json'
26
+ body: InputSchema
27
+ }
28
+
29
+ export interface HandlerSuccess {
30
+ encoding: 'application/json'
31
+ body: OutputSchema
32
+ headers?: { [key: string]: string }
33
+ }
34
+
35
+ export interface HandlerError {
36
+ status: number
37
+ message?: string
38
+ error?: 'HandleNotFound' | 'DidNotFound' | 'DidDeactivated'
39
+ }
40
+
41
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
42
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
43
+ auth: HA
44
+ params: QueryParams
45
+ input: HandlerInput
46
+ req: express.Request
47
+ res: express.Response
48
+ resetRouteRateLimits: () => Promise<void>
49
+ }
50
+ export type Handler<HA extends HandlerAuth = never> = (
51
+ ctx: HandlerReqCtx<HA>,
52
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -0,0 +1,52 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
9
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
+
11
+ const is$typed = _is$typed,
12
+ validate = _validate
13
+ const id = 'com.atproto.identity.resolveDid'
14
+
15
+ export interface QueryParams {
16
+ /** DID to resolve. */
17
+ did: string
18
+ }
19
+
20
+ export type InputSchema = undefined
21
+
22
+ export interface OutputSchema {
23
+ /** The complete DID document for the identity. */
24
+ didDoc: { [_ in string]: unknown }
25
+ }
26
+
27
+ export type HandlerInput = undefined
28
+
29
+ export interface HandlerSuccess {
30
+ encoding: 'application/json'
31
+ body: OutputSchema
32
+ headers?: { [key: string]: string }
33
+ }
34
+
35
+ export interface HandlerError {
36
+ status: number
37
+ message?: string
38
+ error?: 'DidNotFound' | 'DidDeactivated'
39
+ }
40
+
41
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
42
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
43
+ auth: HA
44
+ params: QueryParams
45
+ input: HandlerInput
46
+ req: express.Request
47
+ res: express.Response
48
+ resetRouteRateLimits: () => Promise<void>
49
+ }
50
+ export type Handler<HA extends HandlerAuth = never> = (
51
+ ctx: HandlerReqCtx<HA>,
52
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -34,6 +34,7 @@ export interface HandlerSuccess {
34
34
  export interface HandlerError {
35
35
  status: number
36
36
  message?: string
37
+ error?: 'HandleNotFound'
37
38
  }
38
39
 
39
40
  export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
@@ -0,0 +1,48 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
9
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
10
+ import type * as ComAtprotoIdentityDefs from './defs.js'
11
+
12
+ const is$typed = _is$typed,
13
+ validate = _validate
14
+ const id = 'com.atproto.identity.resolveIdentity'
15
+
16
+ export interface QueryParams {
17
+ /** Handle or DID to resolve. */
18
+ identifier: string
19
+ }
20
+
21
+ export type InputSchema = undefined
22
+ export type OutputSchema = ComAtprotoIdentityDefs.IdentityInfo
23
+ export type HandlerInput = undefined
24
+
25
+ export interface HandlerSuccess {
26
+ encoding: 'application/json'
27
+ body: OutputSchema
28
+ headers?: { [key: string]: string }
29
+ }
30
+
31
+ export interface HandlerError {
32
+ status: number
33
+ message?: string
34
+ error?: 'HandleNotFound' | 'DidNotFound' | 'DidDeactivated'
35
+ }
36
+
37
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
38
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
39
+ auth: HA
40
+ params: QueryParams
41
+ input: HandlerInput
42
+ req: express.Request
43
+ res: express.Response
44
+ resetRouteRateLimits: () => Promise<void>
45
+ }
46
+ export type Handler<HA extends HandlerAuth = never> = (
47
+ ctx: HandlerReqCtx<HA>,
48
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -20,10 +20,6 @@ export interface QueryParams {
20
20
  /** The number of records to return. */
21
21
  limit: number
22
22
  cursor?: string
23
- /** DEPRECATED: The lowest sort-ordered rkey to start from (exclusive) */
24
- rkeyStart?: string
25
- /** DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) */
26
- rkeyEnd?: string
27
23
  /** Flag to reverse the order of the returned records. */
28
24
  reverse?: boolean
29
25
  }
@@ -19,8 +19,6 @@ export interface QueryParams {
19
19
  collection: string
20
20
  /** Record Key */
21
21
  rkey: string
22
- /** DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit */
23
- commit?: string
24
22
  }
25
23
 
26
24
  export type InputSchema = undefined
@@ -22,9 +22,6 @@ export type OutputSchema =
22
22
  | $Typed<Sync>
23
23
  | $Typed<Identity>
24
24
  | $Typed<Account>
25
- | $Typed<Handle>
26
- | $Typed<Migrate>
27
- | $Typed<Tombstone>
28
25
  | $Typed<Info>
29
26
  | { $type: string }
30
27
  export type HandlerError = ErrorFrame<'FutureCursor' | 'ConsumerTooSlow'>
@@ -150,62 +147,6 @@ export function validateAccount<V>(v: V) {
150
147
  return validate<Account & V>(v, id, hashAccount)
151
148
  }
152
149
 
153
- /** DEPRECATED -- Use #identity event instead */
154
- export interface Handle {
155
- $type?: 'com.atproto.sync.subscribeRepos#handle'
156
- seq: number
157
- did: string
158
- handle: string
159
- time: string
160
- }
161
-
162
- const hashHandle = 'handle'
163
-
164
- export function isHandle<V>(v: V) {
165
- return is$typed(v, id, hashHandle)
166
- }
167
-
168
- export function validateHandle<V>(v: V) {
169
- return validate<Handle & V>(v, id, hashHandle)
170
- }
171
-
172
- /** DEPRECATED -- Use #account event instead */
173
- export interface Migrate {
174
- $type?: 'com.atproto.sync.subscribeRepos#migrate'
175
- seq: number
176
- did: string
177
- migrateTo: string | null
178
- time: string
179
- }
180
-
181
- const hashMigrate = 'migrate'
182
-
183
- export function isMigrate<V>(v: V) {
184
- return is$typed(v, id, hashMigrate)
185
- }
186
-
187
- export function validateMigrate<V>(v: V) {
188
- return validate<Migrate & V>(v, id, hashMigrate)
189
- }
190
-
191
- /** DEPRECATED -- Use #account event instead */
192
- export interface Tombstone {
193
- $type?: 'com.atproto.sync.subscribeRepos#tombstone'
194
- seq: number
195
- did: string
196
- time: string
197
- }
198
-
199
- const hashTombstone = 'tombstone'
200
-
201
- export function isTombstone<V>(v: V) {
202
- return is$typed(v, id, hashTombstone)
203
- }
204
-
205
- export function validateTombstone<V>(v: V) {
206
- return validate<Tombstone & V>(v, id, hashTombstone)
207
- }
208
-
209
150
  export interface Info {
210
151
  $type?: 'com.atproto.sync.subscribeRepos#info'
211
152
  name: 'OutdatedCursor' | (string & {})
package/src/logger.ts CHANGED
@@ -15,6 +15,8 @@ export const hydrationLogger: ReturnType<typeof subsystemLogger> =
15
15
  subsystemLogger('bsky:hydration')
16
16
  export const featureGatesLogger: ReturnType<typeof subsystemLogger> =
17
17
  subsystemLogger('bsky:featuregates')
18
+ export const dataplaneLogger: ReturnType<typeof subsystemLogger> =
19
+ subsystemLogger('bsky:dp')
18
20
  export const httpLogger: ReturnType<typeof subsystemLogger> =
19
21
  subsystemLogger('bsky')
20
22