@atproto/bsky 0.0.60 → 0.0.62
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.
- package/CHANGELOG.md +14 -0
- package/dist/api/app/bsky/graph/getKnownFollowers.d.ts +4 -0
- package/dist/api/app/bsky/graph/getKnownFollowers.d.ts.map +1 -0
- package/dist/api/app/bsky/graph/getKnownFollowers.js +71 -0
- package/dist/api/app/bsky/graph/getKnownFollowers.js.map +1 -0
- package/dist/api/app/bsky/graph/muteThread.d.ts +4 -0
- package/dist/api/app/bsky/graph/muteThread.d.ts.map +1 -0
- package/dist/api/app/bsky/graph/muteThread.js +19 -0
- package/dist/api/app/bsky/graph/muteThread.js.map +1 -0
- package/dist/api/app/bsky/graph/unmuteThread.d.ts +4 -0
- package/dist/api/app/bsky/graph/unmuteThread.d.ts.map +1 -0
- package/dist/api/app/bsky/graph/unmuteThread.js +19 -0
- package/dist/api/app/bsky/graph/unmuteThread.js.map +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +6 -0
- package/dist/api/index.js.map +1 -1
- package/dist/data-plane/bsync/index.d.ts.map +1 -1
- package/dist/data-plane/bsync/index.js +41 -15
- package/dist/data-plane/bsync/index.js.map +1 -1
- package/dist/data-plane/server/db/database-schema.d.ts +2 -1
- package/dist/data-plane/server/db/database-schema.d.ts.map +1 -1
- package/dist/data-plane/server/db/migrations/20240606T171229898Z-thread-mutes.d.ts +4 -0
- package/dist/data-plane/server/db/migrations/20240606T171229898Z-thread-mutes.d.ts.map +1 -0
- package/dist/data-plane/server/db/migrations/20240606T171229898Z-thread-mutes.js +18 -0
- package/dist/data-plane/server/db/migrations/20240606T171229898Z-thread-mutes.js.map +1 -0
- package/dist/data-plane/server/db/migrations/index.d.ts +1 -0
- package/dist/data-plane/server/db/migrations/index.d.ts.map +1 -1
- package/dist/data-plane/server/db/migrations/index.js +2 -1
- package/dist/data-plane/server/db/migrations/index.js.map +1 -1
- package/dist/data-plane/server/db/tables/thread-mute.d.ts +10 -0
- package/dist/data-plane/server/db/tables/thread-mute.d.ts.map +1 -0
- package/dist/data-plane/server/db/tables/thread-mute.js +5 -0
- package/dist/data-plane/server/db/tables/thread-mute.js.map +1 -0
- package/dist/data-plane/server/indexing/processor.d.ts +2 -0
- package/dist/data-plane/server/indexing/processor.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/processor.js +28 -1
- package/dist/data-plane/server/indexing/processor.js.map +1 -1
- package/dist/data-plane/server/routes/follows.d.ts.map +1 -1
- package/dist/data-plane/server/routes/follows.js +34 -2
- package/dist/data-plane/server/routes/follows.js.map +1 -1
- package/dist/data-plane/server/routes/mutes.d.ts.map +1 -1
- package/dist/data-plane/server/routes/mutes.js +16 -0
- package/dist/data-plane/server/routes/mutes.js.map +1 -1
- package/dist/data-plane/server/util.d.ts +6 -6
- package/dist/hydration/actor.d.ts +6 -0
- package/dist/hydration/actor.d.ts.map +1 -1
- package/dist/hydration/actor.js +17 -0
- package/dist/hydration/actor.js.map +1 -1
- package/dist/hydration/feed.d.ts +6 -1
- package/dist/hydration/feed.d.ts.map +1 -1
- package/dist/hydration/feed.js +16 -2
- package/dist/hydration/feed.js.map +1 -1
- package/dist/hydration/hydrator.d.ts +2 -1
- package/dist/hydration/hydrator.d.ts.map +1 -1
- package/dist/hydration/hydrator.js +28 -7
- package/dist/hydration/hydrator.js.map +1 -1
- package/dist/lexicon/index.d.ts +6 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +12 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +127 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +127 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +9 -0
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js +11 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +1 -0
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/graph/getKnownFollowers.d.ts +40 -0
- package/dist/lexicon/types/app/bsky/graph/getKnownFollowers.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/getKnownFollowers.js +3 -0
- package/dist/lexicon/types/app/bsky/graph/getKnownFollowers.js.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/muteThread.d.ts +29 -0
- package/dist/lexicon/types/app/bsky/graph/muteThread.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/muteThread.js +3 -0
- package/dist/lexicon/types/app/bsky/graph/muteThread.js.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/unmuteThread.d.ts +29 -0
- package/dist/lexicon/types/app/bsky/graph/unmuteThread.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/unmuteThread.js +3 -0
- package/dist/lexicon/types/app/bsky/graph/unmuteThread.js.map +1 -0
- package/dist/logger.d.ts +1 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +2 -1
- package/dist/logger.js.map +1 -1
- package/dist/proto/bsky_connect.d.ts +39 -1
- package/dist/proto/bsky_connect.d.ts.map +1 -1
- package/dist/proto/bsky_connect.js +38 -0
- package/dist/proto/bsky_connect.js.map +1 -1
- package/dist/proto/bsky_pb.d.ts +161 -4
- package/dist/proto/bsky_pb.d.ts.map +1 -1
- package/dist/proto/bsky_pb.js +512 -12
- package/dist/proto/bsky_pb.js.map +1 -1
- package/dist/views/index.d.ts +5 -0
- package/dist/views/index.d.ts.map +1 -1
- package/dist/views/index.js +20 -0
- package/dist/views/index.js.map +1 -1
- package/package.json +5 -5
- package/proto/bsky.proto +47 -2
- package/src/api/app/bsky/graph/getKnownFollowers.ts +119 -0
- package/src/api/app/bsky/graph/muteThread.ts +18 -0
- package/src/api/app/bsky/graph/unmuteThread.ts +18 -0
- package/src/api/index.ts +6 -0
- package/src/data-plane/bsync/index.ts +39 -15
- package/src/data-plane/server/db/database-schema.ts +2 -0
- package/src/data-plane/server/db/migrations/20240606T171229898Z-thread-mutes.ts +15 -0
- package/src/data-plane/server/db/migrations/index.ts +1 -0
- package/src/data-plane/server/db/tables/thread-mute.ts +9 -0
- package/src/data-plane/server/indexing/processor.ts +29 -1
- package/src/data-plane/server/routes/follows.ts +45 -2
- package/src/data-plane/server/routes/mutes.ts +17 -0
- package/src/hydration/actor.ts +30 -0
- package/src/hydration/feed.ts +23 -3
- package/src/hydration/hydrator.ts +36 -7
- package/src/lexicon/index.ts +36 -0
- package/src/lexicon/lexicons.ts +129 -0
- package/src/lexicon/types/app/bsky/actor/defs.ts +20 -0
- package/src/lexicon/types/app/bsky/feed/defs.ts +1 -0
- package/src/lexicon/types/app/bsky/graph/getKnownFollowers.ts +50 -0
- package/src/lexicon/types/app/bsky/graph/muteThread.ts +38 -0
- package/src/lexicon/types/app/bsky/graph/unmuteThread.ts +38 -0
- package/src/logger.ts +2 -0
- package/src/proto/bsky_connect.ts +46 -0
- package/src/proto/bsky_pb.ts +540 -8
- package/src/views/index.ts +25 -0
- package/tests/__snapshots__/feed-generation.test.ts.snap +38 -12
- package/tests/data-plane/__snapshots__/indexing.test.ts.snap +73 -37
- package/tests/data-plane/thread-mutes.test.ts +140 -0
- package/tests/label-hydration.test.ts +0 -2
- package/tests/query-labels.test.ts +0 -3
- package/tests/views/__snapshots__/author-feed.test.ts.snap +62 -17
- package/tests/views/__snapshots__/block-lists.test.ts.snap +7 -2
- package/tests/views/__snapshots__/blocks.test.ts.snap +13 -4
- package/tests/views/__snapshots__/list-feed.test.ts.snap +23 -6
- package/tests/views/__snapshots__/mute-lists.test.ts.snap +10 -3
- package/tests/views/__snapshots__/mutes.test.ts.snap +9 -3
- package/tests/views/__snapshots__/posts.test.ts.snap +16 -5
- package/tests/views/__snapshots__/profile.test.ts.snap +230 -10
- package/tests/views/__snapshots__/thread.test.ts.snap +53 -14
- package/tests/views/__snapshots__/timeline.test.ts.snap +213 -64
- package/tests/views/blocks.test.ts +13 -0
- package/tests/views/profile.test.ts +35 -0
- package/tests/views/threadgating.test.ts +19 -19
package/src/proto/bsky_pb.ts
CHANGED
|
@@ -5696,6 +5696,140 @@ export class GetMutelistSubscriptionsResponse extends Message<GetMutelistSubscri
|
|
|
5696
5696
|
}
|
|
5697
5697
|
}
|
|
5698
5698
|
|
|
5699
|
+
/**
|
|
5700
|
+
* @generated from message bsky.GetThreadMutesOnSubjectsRequest
|
|
5701
|
+
*/
|
|
5702
|
+
export class GetThreadMutesOnSubjectsRequest extends Message<GetThreadMutesOnSubjectsRequest> {
|
|
5703
|
+
/**
|
|
5704
|
+
* @generated from field: string actor_did = 1;
|
|
5705
|
+
*/
|
|
5706
|
+
actorDid = ''
|
|
5707
|
+
|
|
5708
|
+
/**
|
|
5709
|
+
* @generated from field: repeated string thread_roots = 2;
|
|
5710
|
+
*/
|
|
5711
|
+
threadRoots: string[] = []
|
|
5712
|
+
|
|
5713
|
+
constructor(data?: PartialMessage<GetThreadMutesOnSubjectsRequest>) {
|
|
5714
|
+
super()
|
|
5715
|
+
proto3.util.initPartial(data, this)
|
|
5716
|
+
}
|
|
5717
|
+
|
|
5718
|
+
static readonly runtime: typeof proto3 = proto3
|
|
5719
|
+
static readonly typeName = 'bsky.GetThreadMutesOnSubjectsRequest'
|
|
5720
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
5721
|
+
{ no: 1, name: 'actor_did', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
|
|
5722
|
+
{
|
|
5723
|
+
no: 2,
|
|
5724
|
+
name: 'thread_roots',
|
|
5725
|
+
kind: 'scalar',
|
|
5726
|
+
T: 9 /* ScalarType.STRING */,
|
|
5727
|
+
repeated: true,
|
|
5728
|
+
},
|
|
5729
|
+
])
|
|
5730
|
+
|
|
5731
|
+
static fromBinary(
|
|
5732
|
+
bytes: Uint8Array,
|
|
5733
|
+
options?: Partial<BinaryReadOptions>,
|
|
5734
|
+
): GetThreadMutesOnSubjectsRequest {
|
|
5735
|
+
return new GetThreadMutesOnSubjectsRequest().fromBinary(bytes, options)
|
|
5736
|
+
}
|
|
5737
|
+
|
|
5738
|
+
static fromJson(
|
|
5739
|
+
jsonValue: JsonValue,
|
|
5740
|
+
options?: Partial<JsonReadOptions>,
|
|
5741
|
+
): GetThreadMutesOnSubjectsRequest {
|
|
5742
|
+
return new GetThreadMutesOnSubjectsRequest().fromJson(jsonValue, options)
|
|
5743
|
+
}
|
|
5744
|
+
|
|
5745
|
+
static fromJsonString(
|
|
5746
|
+
jsonString: string,
|
|
5747
|
+
options?: Partial<JsonReadOptions>,
|
|
5748
|
+
): GetThreadMutesOnSubjectsRequest {
|
|
5749
|
+
return new GetThreadMutesOnSubjectsRequest().fromJsonString(
|
|
5750
|
+
jsonString,
|
|
5751
|
+
options,
|
|
5752
|
+
)
|
|
5753
|
+
}
|
|
5754
|
+
|
|
5755
|
+
static equals(
|
|
5756
|
+
a:
|
|
5757
|
+
| GetThreadMutesOnSubjectsRequest
|
|
5758
|
+
| PlainMessage<GetThreadMutesOnSubjectsRequest>
|
|
5759
|
+
| undefined,
|
|
5760
|
+
b:
|
|
5761
|
+
| GetThreadMutesOnSubjectsRequest
|
|
5762
|
+
| PlainMessage<GetThreadMutesOnSubjectsRequest>
|
|
5763
|
+
| undefined,
|
|
5764
|
+
): boolean {
|
|
5765
|
+
return proto3.util.equals(GetThreadMutesOnSubjectsRequest, a, b)
|
|
5766
|
+
}
|
|
5767
|
+
}
|
|
5768
|
+
|
|
5769
|
+
/**
|
|
5770
|
+
* @generated from message bsky.GetThreadMutesOnSubjectsResponse
|
|
5771
|
+
*/
|
|
5772
|
+
export class GetThreadMutesOnSubjectsResponse extends Message<GetThreadMutesOnSubjectsResponse> {
|
|
5773
|
+
/**
|
|
5774
|
+
* @generated from field: repeated bool muted = 1;
|
|
5775
|
+
*/
|
|
5776
|
+
muted: boolean[] = []
|
|
5777
|
+
|
|
5778
|
+
constructor(data?: PartialMessage<GetThreadMutesOnSubjectsResponse>) {
|
|
5779
|
+
super()
|
|
5780
|
+
proto3.util.initPartial(data, this)
|
|
5781
|
+
}
|
|
5782
|
+
|
|
5783
|
+
static readonly runtime: typeof proto3 = proto3
|
|
5784
|
+
static readonly typeName = 'bsky.GetThreadMutesOnSubjectsResponse'
|
|
5785
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
5786
|
+
{
|
|
5787
|
+
no: 1,
|
|
5788
|
+
name: 'muted',
|
|
5789
|
+
kind: 'scalar',
|
|
5790
|
+
T: 8 /* ScalarType.BOOL */,
|
|
5791
|
+
repeated: true,
|
|
5792
|
+
},
|
|
5793
|
+
])
|
|
5794
|
+
|
|
5795
|
+
static fromBinary(
|
|
5796
|
+
bytes: Uint8Array,
|
|
5797
|
+
options?: Partial<BinaryReadOptions>,
|
|
5798
|
+
): GetThreadMutesOnSubjectsResponse {
|
|
5799
|
+
return new GetThreadMutesOnSubjectsResponse().fromBinary(bytes, options)
|
|
5800
|
+
}
|
|
5801
|
+
|
|
5802
|
+
static fromJson(
|
|
5803
|
+
jsonValue: JsonValue,
|
|
5804
|
+
options?: Partial<JsonReadOptions>,
|
|
5805
|
+
): GetThreadMutesOnSubjectsResponse {
|
|
5806
|
+
return new GetThreadMutesOnSubjectsResponse().fromJson(jsonValue, options)
|
|
5807
|
+
}
|
|
5808
|
+
|
|
5809
|
+
static fromJsonString(
|
|
5810
|
+
jsonString: string,
|
|
5811
|
+
options?: Partial<JsonReadOptions>,
|
|
5812
|
+
): GetThreadMutesOnSubjectsResponse {
|
|
5813
|
+
return new GetThreadMutesOnSubjectsResponse().fromJsonString(
|
|
5814
|
+
jsonString,
|
|
5815
|
+
options,
|
|
5816
|
+
)
|
|
5817
|
+
}
|
|
5818
|
+
|
|
5819
|
+
static equals(
|
|
5820
|
+
a:
|
|
5821
|
+
| GetThreadMutesOnSubjectsResponse
|
|
5822
|
+
| PlainMessage<GetThreadMutesOnSubjectsResponse>
|
|
5823
|
+
| undefined,
|
|
5824
|
+
b:
|
|
5825
|
+
| GetThreadMutesOnSubjectsResponse
|
|
5826
|
+
| PlainMessage<GetThreadMutesOnSubjectsResponse>
|
|
5827
|
+
| undefined,
|
|
5828
|
+
): boolean {
|
|
5829
|
+
return proto3.util.equals(GetThreadMutesOnSubjectsResponse, a, b)
|
|
5830
|
+
}
|
|
5831
|
+
}
|
|
5832
|
+
|
|
5699
5833
|
/**
|
|
5700
5834
|
* - Return block uri if there is a block between users A & B (bidirectional)
|
|
5701
5835
|
* - hydrating (& actioning) block state on profiles
|
|
@@ -9820,9 +9954,9 @@ export class GetFollowsFollowingRequest extends Message<GetFollowsFollowingReque
|
|
|
9820
9954
|
actorDid = ''
|
|
9821
9955
|
|
|
9822
9956
|
/**
|
|
9823
|
-
* @generated from field: string
|
|
9957
|
+
* @generated from field: repeated string target_dids = 2;
|
|
9824
9958
|
*/
|
|
9825
|
-
|
|
9959
|
+
targetDids: string[] = []
|
|
9826
9960
|
|
|
9827
9961
|
constructor(data?: PartialMessage<GetFollowsFollowingRequest>) {
|
|
9828
9962
|
super()
|
|
@@ -9833,7 +9967,13 @@ export class GetFollowsFollowingRequest extends Message<GetFollowsFollowingReque
|
|
|
9833
9967
|
static readonly typeName = 'bsky.GetFollowsFollowingRequest'
|
|
9834
9968
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
9835
9969
|
{ no: 1, name: 'actor_did', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
|
|
9836
|
-
{
|
|
9970
|
+
{
|
|
9971
|
+
no: 2,
|
|
9972
|
+
name: 'target_dids',
|
|
9973
|
+
kind: 'scalar',
|
|
9974
|
+
T: 9 /* ScalarType.STRING */,
|
|
9975
|
+
repeated: true,
|
|
9976
|
+
},
|
|
9837
9977
|
])
|
|
9838
9978
|
|
|
9839
9979
|
static fromBinary(
|
|
@@ -9871,14 +10011,75 @@ export class GetFollowsFollowingRequest extends Message<GetFollowsFollowingReque
|
|
|
9871
10011
|
}
|
|
9872
10012
|
}
|
|
9873
10013
|
|
|
10014
|
+
/**
|
|
10015
|
+
* @generated from message bsky.FollowsFollowing
|
|
10016
|
+
*/
|
|
10017
|
+
export class FollowsFollowing extends Message<FollowsFollowing> {
|
|
10018
|
+
/**
|
|
10019
|
+
* @generated from field: string target_did = 1;
|
|
10020
|
+
*/
|
|
10021
|
+
targetDid = ''
|
|
10022
|
+
|
|
10023
|
+
/**
|
|
10024
|
+
* @generated from field: repeated string dids = 2;
|
|
10025
|
+
*/
|
|
10026
|
+
dids: string[] = []
|
|
10027
|
+
|
|
10028
|
+
constructor(data?: PartialMessage<FollowsFollowing>) {
|
|
10029
|
+
super()
|
|
10030
|
+
proto3.util.initPartial(data, this)
|
|
10031
|
+
}
|
|
10032
|
+
|
|
10033
|
+
static readonly runtime: typeof proto3 = proto3
|
|
10034
|
+
static readonly typeName = 'bsky.FollowsFollowing'
|
|
10035
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
10036
|
+
{ no: 1, name: 'target_did', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
|
|
10037
|
+
{
|
|
10038
|
+
no: 2,
|
|
10039
|
+
name: 'dids',
|
|
10040
|
+
kind: 'scalar',
|
|
10041
|
+
T: 9 /* ScalarType.STRING */,
|
|
10042
|
+
repeated: true,
|
|
10043
|
+
},
|
|
10044
|
+
])
|
|
10045
|
+
|
|
10046
|
+
static fromBinary(
|
|
10047
|
+
bytes: Uint8Array,
|
|
10048
|
+
options?: Partial<BinaryReadOptions>,
|
|
10049
|
+
): FollowsFollowing {
|
|
10050
|
+
return new FollowsFollowing().fromBinary(bytes, options)
|
|
10051
|
+
}
|
|
10052
|
+
|
|
10053
|
+
static fromJson(
|
|
10054
|
+
jsonValue: JsonValue,
|
|
10055
|
+
options?: Partial<JsonReadOptions>,
|
|
10056
|
+
): FollowsFollowing {
|
|
10057
|
+
return new FollowsFollowing().fromJson(jsonValue, options)
|
|
10058
|
+
}
|
|
10059
|
+
|
|
10060
|
+
static fromJsonString(
|
|
10061
|
+
jsonString: string,
|
|
10062
|
+
options?: Partial<JsonReadOptions>,
|
|
10063
|
+
): FollowsFollowing {
|
|
10064
|
+
return new FollowsFollowing().fromJsonString(jsonString, options)
|
|
10065
|
+
}
|
|
10066
|
+
|
|
10067
|
+
static equals(
|
|
10068
|
+
a: FollowsFollowing | PlainMessage<FollowsFollowing> | undefined,
|
|
10069
|
+
b: FollowsFollowing | PlainMessage<FollowsFollowing> | undefined,
|
|
10070
|
+
): boolean {
|
|
10071
|
+
return proto3.util.equals(FollowsFollowing, a, b)
|
|
10072
|
+
}
|
|
10073
|
+
}
|
|
10074
|
+
|
|
9874
10075
|
/**
|
|
9875
10076
|
* @generated from message bsky.GetFollowsFollowingResponse
|
|
9876
10077
|
*/
|
|
9877
10078
|
export class GetFollowsFollowingResponse extends Message<GetFollowsFollowingResponse> {
|
|
9878
10079
|
/**
|
|
9879
|
-
* @generated from field: repeated
|
|
10080
|
+
* @generated from field: repeated bsky.FollowsFollowing results = 1;
|
|
9880
10081
|
*/
|
|
9881
|
-
|
|
10082
|
+
results: FollowsFollowing[] = []
|
|
9882
10083
|
|
|
9883
10084
|
constructor(data?: PartialMessage<GetFollowsFollowingResponse>) {
|
|
9884
10085
|
super()
|
|
@@ -9890,9 +10091,9 @@ export class GetFollowsFollowingResponse extends Message<GetFollowsFollowingResp
|
|
|
9890
10091
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
9891
10092
|
{
|
|
9892
10093
|
no: 1,
|
|
9893
|
-
name: '
|
|
9894
|
-
kind: '
|
|
9895
|
-
T:
|
|
10094
|
+
name: 'results',
|
|
10095
|
+
kind: 'message',
|
|
10096
|
+
T: FollowsFollowing,
|
|
9896
10097
|
repeated: true,
|
|
9897
10098
|
},
|
|
9898
10099
|
])
|
|
@@ -11507,3 +11708,334 @@ export class ClearActorMutelistSubscriptionsResponse extends Message<ClearActorM
|
|
|
11507
11708
|
return proto3.util.equals(ClearActorMutelistSubscriptionsResponse, a, b)
|
|
11508
11709
|
}
|
|
11509
11710
|
}
|
|
11711
|
+
|
|
11712
|
+
/**
|
|
11713
|
+
* @generated from message bsky.CreateThreadMuteRequest
|
|
11714
|
+
*/
|
|
11715
|
+
export class CreateThreadMuteRequest extends Message<CreateThreadMuteRequest> {
|
|
11716
|
+
/**
|
|
11717
|
+
* @generated from field: string actor_did = 1;
|
|
11718
|
+
*/
|
|
11719
|
+
actorDid = ''
|
|
11720
|
+
|
|
11721
|
+
/**
|
|
11722
|
+
* @generated from field: string thread_root = 2;
|
|
11723
|
+
*/
|
|
11724
|
+
threadRoot = ''
|
|
11725
|
+
|
|
11726
|
+
constructor(data?: PartialMessage<CreateThreadMuteRequest>) {
|
|
11727
|
+
super()
|
|
11728
|
+
proto3.util.initPartial(data, this)
|
|
11729
|
+
}
|
|
11730
|
+
|
|
11731
|
+
static readonly runtime: typeof proto3 = proto3
|
|
11732
|
+
static readonly typeName = 'bsky.CreateThreadMuteRequest'
|
|
11733
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
11734
|
+
{ no: 1, name: 'actor_did', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
|
|
11735
|
+
{
|
|
11736
|
+
no: 2,
|
|
11737
|
+
name: 'thread_root',
|
|
11738
|
+
kind: 'scalar',
|
|
11739
|
+
T: 9 /* ScalarType.STRING */,
|
|
11740
|
+
},
|
|
11741
|
+
])
|
|
11742
|
+
|
|
11743
|
+
static fromBinary(
|
|
11744
|
+
bytes: Uint8Array,
|
|
11745
|
+
options?: Partial<BinaryReadOptions>,
|
|
11746
|
+
): CreateThreadMuteRequest {
|
|
11747
|
+
return new CreateThreadMuteRequest().fromBinary(bytes, options)
|
|
11748
|
+
}
|
|
11749
|
+
|
|
11750
|
+
static fromJson(
|
|
11751
|
+
jsonValue: JsonValue,
|
|
11752
|
+
options?: Partial<JsonReadOptions>,
|
|
11753
|
+
): CreateThreadMuteRequest {
|
|
11754
|
+
return new CreateThreadMuteRequest().fromJson(jsonValue, options)
|
|
11755
|
+
}
|
|
11756
|
+
|
|
11757
|
+
static fromJsonString(
|
|
11758
|
+
jsonString: string,
|
|
11759
|
+
options?: Partial<JsonReadOptions>,
|
|
11760
|
+
): CreateThreadMuteRequest {
|
|
11761
|
+
return new CreateThreadMuteRequest().fromJsonString(jsonString, options)
|
|
11762
|
+
}
|
|
11763
|
+
|
|
11764
|
+
static equals(
|
|
11765
|
+
a:
|
|
11766
|
+
| CreateThreadMuteRequest
|
|
11767
|
+
| PlainMessage<CreateThreadMuteRequest>
|
|
11768
|
+
| undefined,
|
|
11769
|
+
b:
|
|
11770
|
+
| CreateThreadMuteRequest
|
|
11771
|
+
| PlainMessage<CreateThreadMuteRequest>
|
|
11772
|
+
| undefined,
|
|
11773
|
+
): boolean {
|
|
11774
|
+
return proto3.util.equals(CreateThreadMuteRequest, a, b)
|
|
11775
|
+
}
|
|
11776
|
+
}
|
|
11777
|
+
|
|
11778
|
+
/**
|
|
11779
|
+
* @generated from message bsky.CreateThreadMuteResponse
|
|
11780
|
+
*/
|
|
11781
|
+
export class CreateThreadMuteResponse extends Message<CreateThreadMuteResponse> {
|
|
11782
|
+
constructor(data?: PartialMessage<CreateThreadMuteResponse>) {
|
|
11783
|
+
super()
|
|
11784
|
+
proto3.util.initPartial(data, this)
|
|
11785
|
+
}
|
|
11786
|
+
|
|
11787
|
+
static readonly runtime: typeof proto3 = proto3
|
|
11788
|
+
static readonly typeName = 'bsky.CreateThreadMuteResponse'
|
|
11789
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [])
|
|
11790
|
+
|
|
11791
|
+
static fromBinary(
|
|
11792
|
+
bytes: Uint8Array,
|
|
11793
|
+
options?: Partial<BinaryReadOptions>,
|
|
11794
|
+
): CreateThreadMuteResponse {
|
|
11795
|
+
return new CreateThreadMuteResponse().fromBinary(bytes, options)
|
|
11796
|
+
}
|
|
11797
|
+
|
|
11798
|
+
static fromJson(
|
|
11799
|
+
jsonValue: JsonValue,
|
|
11800
|
+
options?: Partial<JsonReadOptions>,
|
|
11801
|
+
): CreateThreadMuteResponse {
|
|
11802
|
+
return new CreateThreadMuteResponse().fromJson(jsonValue, options)
|
|
11803
|
+
}
|
|
11804
|
+
|
|
11805
|
+
static fromJsonString(
|
|
11806
|
+
jsonString: string,
|
|
11807
|
+
options?: Partial<JsonReadOptions>,
|
|
11808
|
+
): CreateThreadMuteResponse {
|
|
11809
|
+
return new CreateThreadMuteResponse().fromJsonString(jsonString, options)
|
|
11810
|
+
}
|
|
11811
|
+
|
|
11812
|
+
static equals(
|
|
11813
|
+
a:
|
|
11814
|
+
| CreateThreadMuteResponse
|
|
11815
|
+
| PlainMessage<CreateThreadMuteResponse>
|
|
11816
|
+
| undefined,
|
|
11817
|
+
b:
|
|
11818
|
+
| CreateThreadMuteResponse
|
|
11819
|
+
| PlainMessage<CreateThreadMuteResponse>
|
|
11820
|
+
| undefined,
|
|
11821
|
+
): boolean {
|
|
11822
|
+
return proto3.util.equals(CreateThreadMuteResponse, a, b)
|
|
11823
|
+
}
|
|
11824
|
+
}
|
|
11825
|
+
|
|
11826
|
+
/**
|
|
11827
|
+
* @generated from message bsky.DeleteThreadMuteRequest
|
|
11828
|
+
*/
|
|
11829
|
+
export class DeleteThreadMuteRequest extends Message<DeleteThreadMuteRequest> {
|
|
11830
|
+
/**
|
|
11831
|
+
* @generated from field: string actor_did = 1;
|
|
11832
|
+
*/
|
|
11833
|
+
actorDid = ''
|
|
11834
|
+
|
|
11835
|
+
/**
|
|
11836
|
+
* @generated from field: string thread_root = 2;
|
|
11837
|
+
*/
|
|
11838
|
+
threadRoot = ''
|
|
11839
|
+
|
|
11840
|
+
constructor(data?: PartialMessage<DeleteThreadMuteRequest>) {
|
|
11841
|
+
super()
|
|
11842
|
+
proto3.util.initPartial(data, this)
|
|
11843
|
+
}
|
|
11844
|
+
|
|
11845
|
+
static readonly runtime: typeof proto3 = proto3
|
|
11846
|
+
static readonly typeName = 'bsky.DeleteThreadMuteRequest'
|
|
11847
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
11848
|
+
{ no: 1, name: 'actor_did', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
|
|
11849
|
+
{
|
|
11850
|
+
no: 2,
|
|
11851
|
+
name: 'thread_root',
|
|
11852
|
+
kind: 'scalar',
|
|
11853
|
+
T: 9 /* ScalarType.STRING */,
|
|
11854
|
+
},
|
|
11855
|
+
])
|
|
11856
|
+
|
|
11857
|
+
static fromBinary(
|
|
11858
|
+
bytes: Uint8Array,
|
|
11859
|
+
options?: Partial<BinaryReadOptions>,
|
|
11860
|
+
): DeleteThreadMuteRequest {
|
|
11861
|
+
return new DeleteThreadMuteRequest().fromBinary(bytes, options)
|
|
11862
|
+
}
|
|
11863
|
+
|
|
11864
|
+
static fromJson(
|
|
11865
|
+
jsonValue: JsonValue,
|
|
11866
|
+
options?: Partial<JsonReadOptions>,
|
|
11867
|
+
): DeleteThreadMuteRequest {
|
|
11868
|
+
return new DeleteThreadMuteRequest().fromJson(jsonValue, options)
|
|
11869
|
+
}
|
|
11870
|
+
|
|
11871
|
+
static fromJsonString(
|
|
11872
|
+
jsonString: string,
|
|
11873
|
+
options?: Partial<JsonReadOptions>,
|
|
11874
|
+
): DeleteThreadMuteRequest {
|
|
11875
|
+
return new DeleteThreadMuteRequest().fromJsonString(jsonString, options)
|
|
11876
|
+
}
|
|
11877
|
+
|
|
11878
|
+
static equals(
|
|
11879
|
+
a:
|
|
11880
|
+
| DeleteThreadMuteRequest
|
|
11881
|
+
| PlainMessage<DeleteThreadMuteRequest>
|
|
11882
|
+
| undefined,
|
|
11883
|
+
b:
|
|
11884
|
+
| DeleteThreadMuteRequest
|
|
11885
|
+
| PlainMessage<DeleteThreadMuteRequest>
|
|
11886
|
+
| undefined,
|
|
11887
|
+
): boolean {
|
|
11888
|
+
return proto3.util.equals(DeleteThreadMuteRequest, a, b)
|
|
11889
|
+
}
|
|
11890
|
+
}
|
|
11891
|
+
|
|
11892
|
+
/**
|
|
11893
|
+
* @generated from message bsky.DeleteThreadMuteResponse
|
|
11894
|
+
*/
|
|
11895
|
+
export class DeleteThreadMuteResponse extends Message<DeleteThreadMuteResponse> {
|
|
11896
|
+
constructor(data?: PartialMessage<DeleteThreadMuteResponse>) {
|
|
11897
|
+
super()
|
|
11898
|
+
proto3.util.initPartial(data, this)
|
|
11899
|
+
}
|
|
11900
|
+
|
|
11901
|
+
static readonly runtime: typeof proto3 = proto3
|
|
11902
|
+
static readonly typeName = 'bsky.DeleteThreadMuteResponse'
|
|
11903
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [])
|
|
11904
|
+
|
|
11905
|
+
static fromBinary(
|
|
11906
|
+
bytes: Uint8Array,
|
|
11907
|
+
options?: Partial<BinaryReadOptions>,
|
|
11908
|
+
): DeleteThreadMuteResponse {
|
|
11909
|
+
return new DeleteThreadMuteResponse().fromBinary(bytes, options)
|
|
11910
|
+
}
|
|
11911
|
+
|
|
11912
|
+
static fromJson(
|
|
11913
|
+
jsonValue: JsonValue,
|
|
11914
|
+
options?: Partial<JsonReadOptions>,
|
|
11915
|
+
): DeleteThreadMuteResponse {
|
|
11916
|
+
return new DeleteThreadMuteResponse().fromJson(jsonValue, options)
|
|
11917
|
+
}
|
|
11918
|
+
|
|
11919
|
+
static fromJsonString(
|
|
11920
|
+
jsonString: string,
|
|
11921
|
+
options?: Partial<JsonReadOptions>,
|
|
11922
|
+
): DeleteThreadMuteResponse {
|
|
11923
|
+
return new DeleteThreadMuteResponse().fromJsonString(jsonString, options)
|
|
11924
|
+
}
|
|
11925
|
+
|
|
11926
|
+
static equals(
|
|
11927
|
+
a:
|
|
11928
|
+
| DeleteThreadMuteResponse
|
|
11929
|
+
| PlainMessage<DeleteThreadMuteResponse>
|
|
11930
|
+
| undefined,
|
|
11931
|
+
b:
|
|
11932
|
+
| DeleteThreadMuteResponse
|
|
11933
|
+
| PlainMessage<DeleteThreadMuteResponse>
|
|
11934
|
+
| undefined,
|
|
11935
|
+
): boolean {
|
|
11936
|
+
return proto3.util.equals(DeleteThreadMuteResponse, a, b)
|
|
11937
|
+
}
|
|
11938
|
+
}
|
|
11939
|
+
|
|
11940
|
+
/**
|
|
11941
|
+
* @generated from message bsky.ClearThreadMutesRequest
|
|
11942
|
+
*/
|
|
11943
|
+
export class ClearThreadMutesRequest extends Message<ClearThreadMutesRequest> {
|
|
11944
|
+
/**
|
|
11945
|
+
* @generated from field: string actor_did = 1;
|
|
11946
|
+
*/
|
|
11947
|
+
actorDid = ''
|
|
11948
|
+
|
|
11949
|
+
constructor(data?: PartialMessage<ClearThreadMutesRequest>) {
|
|
11950
|
+
super()
|
|
11951
|
+
proto3.util.initPartial(data, this)
|
|
11952
|
+
}
|
|
11953
|
+
|
|
11954
|
+
static readonly runtime: typeof proto3 = proto3
|
|
11955
|
+
static readonly typeName = 'bsky.ClearThreadMutesRequest'
|
|
11956
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
11957
|
+
{ no: 1, name: 'actor_did', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
|
|
11958
|
+
])
|
|
11959
|
+
|
|
11960
|
+
static fromBinary(
|
|
11961
|
+
bytes: Uint8Array,
|
|
11962
|
+
options?: Partial<BinaryReadOptions>,
|
|
11963
|
+
): ClearThreadMutesRequest {
|
|
11964
|
+
return new ClearThreadMutesRequest().fromBinary(bytes, options)
|
|
11965
|
+
}
|
|
11966
|
+
|
|
11967
|
+
static fromJson(
|
|
11968
|
+
jsonValue: JsonValue,
|
|
11969
|
+
options?: Partial<JsonReadOptions>,
|
|
11970
|
+
): ClearThreadMutesRequest {
|
|
11971
|
+
return new ClearThreadMutesRequest().fromJson(jsonValue, options)
|
|
11972
|
+
}
|
|
11973
|
+
|
|
11974
|
+
static fromJsonString(
|
|
11975
|
+
jsonString: string,
|
|
11976
|
+
options?: Partial<JsonReadOptions>,
|
|
11977
|
+
): ClearThreadMutesRequest {
|
|
11978
|
+
return new ClearThreadMutesRequest().fromJsonString(jsonString, options)
|
|
11979
|
+
}
|
|
11980
|
+
|
|
11981
|
+
static equals(
|
|
11982
|
+
a:
|
|
11983
|
+
| ClearThreadMutesRequest
|
|
11984
|
+
| PlainMessage<ClearThreadMutesRequest>
|
|
11985
|
+
| undefined,
|
|
11986
|
+
b:
|
|
11987
|
+
| ClearThreadMutesRequest
|
|
11988
|
+
| PlainMessage<ClearThreadMutesRequest>
|
|
11989
|
+
| undefined,
|
|
11990
|
+
): boolean {
|
|
11991
|
+
return proto3.util.equals(ClearThreadMutesRequest, a, b)
|
|
11992
|
+
}
|
|
11993
|
+
}
|
|
11994
|
+
|
|
11995
|
+
/**
|
|
11996
|
+
* @generated from message bsky.ClearThreadMutesResponse
|
|
11997
|
+
*/
|
|
11998
|
+
export class ClearThreadMutesResponse extends Message<ClearThreadMutesResponse> {
|
|
11999
|
+
constructor(data?: PartialMessage<ClearThreadMutesResponse>) {
|
|
12000
|
+
super()
|
|
12001
|
+
proto3.util.initPartial(data, this)
|
|
12002
|
+
}
|
|
12003
|
+
|
|
12004
|
+
static readonly runtime: typeof proto3 = proto3
|
|
12005
|
+
static readonly typeName = 'bsky.ClearThreadMutesResponse'
|
|
12006
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [])
|
|
12007
|
+
|
|
12008
|
+
static fromBinary(
|
|
12009
|
+
bytes: Uint8Array,
|
|
12010
|
+
options?: Partial<BinaryReadOptions>,
|
|
12011
|
+
): ClearThreadMutesResponse {
|
|
12012
|
+
return new ClearThreadMutesResponse().fromBinary(bytes, options)
|
|
12013
|
+
}
|
|
12014
|
+
|
|
12015
|
+
static fromJson(
|
|
12016
|
+
jsonValue: JsonValue,
|
|
12017
|
+
options?: Partial<JsonReadOptions>,
|
|
12018
|
+
): ClearThreadMutesResponse {
|
|
12019
|
+
return new ClearThreadMutesResponse().fromJson(jsonValue, options)
|
|
12020
|
+
}
|
|
12021
|
+
|
|
12022
|
+
static fromJsonString(
|
|
12023
|
+
jsonString: string,
|
|
12024
|
+
options?: Partial<JsonReadOptions>,
|
|
12025
|
+
): ClearThreadMutesResponse {
|
|
12026
|
+
return new ClearThreadMutesResponse().fromJsonString(jsonString, options)
|
|
12027
|
+
}
|
|
12028
|
+
|
|
12029
|
+
static equals(
|
|
12030
|
+
a:
|
|
12031
|
+
| ClearThreadMutesResponse
|
|
12032
|
+
| PlainMessage<ClearThreadMutesResponse>
|
|
12033
|
+
| undefined,
|
|
12034
|
+
b:
|
|
12035
|
+
| ClearThreadMutesResponse
|
|
12036
|
+
| PlainMessage<ClearThreadMutesResponse>
|
|
12037
|
+
| undefined,
|
|
12038
|
+
): boolean {
|
|
12039
|
+
return proto3.util.equals(ClearThreadMutesResponse, a, b)
|
|
12040
|
+
}
|
|
12041
|
+
}
|
package/src/views/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { AtUri, INVALID_HANDLE, normalizeDatetimeAlways } from '@atproto/syntax'
|
|
|
2
2
|
import { mapDefined } from '@atproto/common'
|
|
3
3
|
import { ImageUriBuilder } from '../image/uri'
|
|
4
4
|
import { HydrationState } from '../hydration/hydrator'
|
|
5
|
+
import { ProfileViewerState as HydratorProfileViewerState } from '../hydration/actor'
|
|
5
6
|
import { ids } from '../lexicon/lexicons'
|
|
6
7
|
import {
|
|
7
8
|
ProfileViewDetailed,
|
|
@@ -107,9 +108,19 @@ export class Views {
|
|
|
107
108
|
if (!actor) return
|
|
108
109
|
const baseView = this.profile(did, state)
|
|
109
110
|
if (!baseView) return
|
|
111
|
+
const knownFollowersSkeleton = state.knownFollowers?.get(did)
|
|
112
|
+
const knownFollowers = knownFollowersSkeleton
|
|
113
|
+
? this.knownFollowers(knownFollowersSkeleton, state)
|
|
114
|
+
: undefined
|
|
110
115
|
const profileAggs = state.profileAggs?.get(did)
|
|
111
116
|
return {
|
|
112
117
|
...baseView,
|
|
118
|
+
viewer: baseView.viewer
|
|
119
|
+
? {
|
|
120
|
+
...baseView.viewer,
|
|
121
|
+
knownFollowers,
|
|
122
|
+
}
|
|
123
|
+
: undefined,
|
|
113
124
|
banner: actor.profile?.banner
|
|
114
125
|
? this.imgUriBuilder.getPresetUri(
|
|
115
126
|
'banner',
|
|
@@ -216,6 +227,19 @@ export class Views {
|
|
|
216
227
|
}
|
|
217
228
|
}
|
|
218
229
|
|
|
230
|
+
knownFollowers(
|
|
231
|
+
knownFollowers: Required<HydratorProfileViewerState>['knownFollowers'],
|
|
232
|
+
state: HydrationState,
|
|
233
|
+
) {
|
|
234
|
+
const followers = mapDefined(knownFollowers.followers, (did) => {
|
|
235
|
+
if (this.viewerBlockExists(did, state)) {
|
|
236
|
+
return undefined
|
|
237
|
+
}
|
|
238
|
+
return this.profileBasic(did, state)
|
|
239
|
+
})
|
|
240
|
+
return { count: knownFollowers.count, followers }
|
|
241
|
+
}
|
|
242
|
+
|
|
219
243
|
blockedProfileViewer(
|
|
220
244
|
did: string,
|
|
221
245
|
state: HydrationState,
|
|
@@ -476,6 +500,7 @@ export class Views {
|
|
|
476
500
|
? {
|
|
477
501
|
repost: viewer.repost,
|
|
478
502
|
like: viewer.like,
|
|
503
|
+
threadMuted: viewer.threadMuted,
|
|
479
504
|
replyDisabled: this.userReplyDisabled(uri, state),
|
|
480
505
|
}
|
|
481
506
|
: undefined,
|