@atproto/bsky 0.0.64 → 0.0.66
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 +19 -0
- package/dist/api/app/bsky/actor/getSuggestions.js +1 -1
- package/dist/api/app/bsky/actor/getSuggestions.js.map +1 -1
- package/dist/api/app/bsky/actor/searchActors.js +1 -1
- package/dist/api/app/bsky/actor/searchActors.js.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.js +1 -10
- package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
- package/dist/api/app/bsky/feed/searchPosts.js +1 -1
- package/dist/api/app/bsky/feed/searchPosts.js.map +1 -1
- package/dist/api/app/bsky/graph/getActorStarterPacks.d.ts +4 -0
- package/dist/api/app/bsky/graph/getActorStarterPacks.d.ts.map +1 -0
- package/dist/api/app/bsky/graph/getActorStarterPacks.js +58 -0
- package/dist/api/app/bsky/graph/getActorStarterPacks.js.map +1 -0
- package/dist/api/app/bsky/graph/getStarterPack.d.ts +4 -0
- package/dist/api/app/bsky/graph/getStarterPack.d.ts.map +1 -0
- package/dist/api/app/bsky/graph/getStarterPack.js +45 -0
- package/dist/api/app/bsky/graph/getStarterPack.js.map +1 -0
- package/dist/api/app/bsky/graph/getStarterPacks.d.ts +4 -0
- package/dist/api/app/bsky/graph/getStarterPacks.d.ts.map +1 -0
- package/dist/api/app/bsky/graph/getStarterPacks.js +40 -0
- package/dist/api/app/bsky/graph/getStarterPacks.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/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/20240606T222548219Z-starter-packs.d.ts +4 -0
- package/dist/data-plane/server/db/migrations/20240606T222548219Z-starter-packs.d.ts.map +1 -0
- package/dist/data-plane/server/db/migrations/20240606T222548219Z-starter-packs.js +47 -0
- package/dist/data-plane/server/db/migrations/20240606T222548219Z-starter-packs.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/profile.d.ts +2 -0
- package/dist/data-plane/server/db/tables/profile.d.ts.map +1 -1
- package/dist/data-plane/server/db/tables/starter-pack.d.ts +14 -0
- package/dist/data-plane/server/db/tables/starter-pack.d.ts.map +1 -0
- package/dist/data-plane/server/db/tables/starter-pack.js +5 -0
- package/dist/data-plane/server/db/tables/starter-pack.js.map +1 -0
- package/dist/data-plane/server/indexing/index.d.ts +2 -0
- package/dist/data-plane/server/indexing/index.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/index.js +2 -0
- package/dist/data-plane/server/indexing/index.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/profile.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/profile.js +18 -2
- package/dist/data-plane/server/indexing/plugins/profile.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts +11 -0
- package/dist/data-plane/server/indexing/plugins/starter-pack.d.ts.map +1 -0
- package/dist/data-plane/server/indexing/plugins/starter-pack.js +78 -0
- package/dist/data-plane/server/indexing/plugins/starter-pack.js.map +1 -0
- package/dist/data-plane/server/routes/index.d.ts.map +1 -1
- package/dist/data-plane/server/routes/index.js +2 -0
- package/dist/data-plane/server/routes/index.js.map +1 -1
- package/dist/data-plane/server/routes/interactions.d.ts.map +1 -1
- package/dist/data-plane/server/routes/interactions.js +57 -1
- package/dist/data-plane/server/routes/interactions.js.map +1 -1
- package/dist/data-plane/server/routes/profile.d.ts.map +1 -1
- package/dist/data-plane/server/routes/profile.js +1 -0
- package/dist/data-plane/server/routes/profile.js.map +1 -1
- package/dist/data-plane/server/routes/records.d.ts.map +1 -1
- package/dist/data-plane/server/routes/records.js +1 -0
- package/dist/data-plane/server/routes/records.js.map +1 -1
- package/dist/data-plane/server/routes/starter-packs.d.ts +6 -0
- package/dist/data-plane/server/routes/starter-packs.d.ts.map +1 -0
- package/dist/data-plane/server/routes/starter-packs.js +25 -0
- package/dist/data-plane/server/routes/starter-packs.js.map +1 -0
- package/dist/data-plane/server/util.d.ts +6 -6
- package/dist/hydration/actor.d.ts +2 -0
- package/dist/hydration/actor.d.ts.map +1 -1
- package/dist/hydration/actor.js +2 -0
- package/dist/hydration/actor.js.map +1 -1
- package/dist/hydration/feed.d.ts +1 -5
- package/dist/hydration/feed.d.ts.map +1 -1
- package/dist/hydration/feed.js +0 -1
- package/dist/hydration/feed.js.map +1 -1
- package/dist/hydration/graph.d.ts +17 -1
- package/dist/hydration/graph.d.ts.map +1 -1
- package/dist/hydration/graph.js +30 -1
- package/dist/hydration/graph.js.map +1 -1
- package/dist/hydration/hydrator.d.ts +9 -3
- package/dist/hydration/hydrator.d.ts.map +1 -1
- package/dist/hydration/hydrator.js +114 -5
- package/dist/hydration/hydrator.js.map +1 -1
- package/dist/hydration/util.d.ts +4 -0
- package/dist/hydration/util.d.ts.map +1 -1
- package/dist/hydration/util.js.map +1 -1
- package/dist/lexicon/index.d.ts +7 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +13 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +362 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +367 -2
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +22 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js +21 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/profile.d.ts +3 -0
- package/dist/lexicon/types/app/bsky/actor/profile.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/profile.js.map +1 -1
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts +36 -1
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/graph/defs.js +23 -1
- package/dist/lexicon/types/app/bsky/graph/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/graph/getActorStarterPacks.d.ts +39 -0
- package/dist/lexicon/types/app/bsky/graph/getActorStarterPacks.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/getActorStarterPacks.js +3 -0
- package/dist/lexicon/types/app/bsky/graph/getActorStarterPacks.js.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPack.d.ts +37 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPack.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPack.js +3 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPack.js.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPacks.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPacks.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPacks.js +3 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPacks.js.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/starterpack.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/graph/starterpack.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/starterpack.js +27 -0
- package/dist/lexicon/types/app/bsky/graph/starterpack.js.map +1 -0
- package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts +2 -2
- package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/listNotifications.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 +160 -0
- package/dist/proto/bsky_pb.d.ts.map +1 -1
- package/dist/proto/bsky_pb.js +508 -4
- package/dist/proto/bsky_pb.js.map +1 -1
- package/dist/views/index.d.ts +4 -1
- package/dist/views/index.d.ts.map +1 -1
- package/dist/views/index.js +89 -0
- package/dist/views/index.js.map +1 -1
- package/package.json +5 -5
- package/proto/bsky.proto +47 -0
- package/src/api/app/bsky/actor/getSuggestions.ts +1 -1
- package/src/api/app/bsky/actor/searchActors.ts +1 -1
- package/src/api/app/bsky/feed/getPostThread.ts +1 -9
- package/src/api/app/bsky/feed/searchPosts.ts +1 -1
- package/src/api/app/bsky/graph/getActorStarterPacks.ts +99 -0
- package/src/api/app/bsky/graph/getStarterPack.ts +80 -0
- package/src/api/app/bsky/graph/getStarterPacks.ts +81 -0
- package/src/api/index.ts +6 -0
- package/src/data-plane/server/db/database-schema.ts +2 -0
- package/src/data-plane/server/db/migrations/20240606T222548219Z-starter-packs.ts +45 -0
- package/src/data-plane/server/db/migrations/index.ts +1 -0
- package/src/data-plane/server/db/tables/profile.ts +2 -0
- package/src/data-plane/server/db/tables/starter-pack.ts +16 -0
- package/src/data-plane/server/indexing/index.ts +3 -0
- package/src/data-plane/server/indexing/plugins/profile.ts +16 -2
- package/src/data-plane/server/indexing/plugins/starter-pack.ts +76 -0
- package/src/data-plane/server/routes/index.ts +2 -0
- package/src/data-plane/server/routes/interactions.ts +56 -2
- package/src/data-plane/server/routes/profile.ts +1 -0
- package/src/data-plane/server/routes/records.ts +1 -0
- package/src/data-plane/server/routes/starter-packs.ts +32 -0
- package/src/hydration/actor.ts +5 -0
- package/src/hydration/feed.ts +1 -2
- package/src/hydration/graph.ts +55 -2
- package/src/hydration/hydrator.ts +143 -6
- package/src/hydration/util.ts +2 -0
- package/src/lexicon/index.ts +37 -0
- package/src/lexicon/lexicons.ts +372 -2
- package/src/lexicon/types/app/bsky/actor/defs.ts +44 -0
- package/src/lexicon/types/app/bsky/actor/profile.ts +3 -0
- package/src/lexicon/types/app/bsky/graph/defs.ts +58 -0
- package/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts +49 -0
- package/src/lexicon/types/app/bsky/graph/getStarterPack.ts +47 -0
- package/src/lexicon/types/app/bsky/graph/getStarterPacks.ts +46 -0
- package/src/lexicon/types/app/bsky/graph/starterpack.ts +50 -0
- package/src/lexicon/types/app/bsky/notification/listNotifications.ts +2 -1
- package/src/proto/bsky_connect.ts +46 -0
- package/src/proto/bsky_pb.ts +512 -0
- package/src/views/index.ts +98 -1
- package/tests/__snapshots__/feed-generation.test.ts.snap +28 -0
- package/tests/data-plane/__snapshots__/indexing.test.ts.snap +9 -0
- package/tests/views/__snapshots__/author-feed.test.ts.snap +29 -0
- package/tests/views/__snapshots__/block-lists.test.ts.snap +16 -0
- package/tests/views/__snapshots__/blocks.test.ts.snap +4 -0
- package/tests/views/__snapshots__/follows.test.ts.snap +34 -0
- package/tests/views/__snapshots__/labeler-service.test.ts.snap +4 -0
- package/tests/views/__snapshots__/likes.test.ts.snap +1 -0
- package/tests/views/__snapshots__/list-feed.test.ts.snap +12 -0
- package/tests/views/__snapshots__/mute-lists.test.ts.snap +20 -0
- package/tests/views/__snapshots__/mutes.test.ts.snap +8 -0
- package/tests/views/__snapshots__/notifications.test.ts.snap +10 -0
- package/tests/views/__snapshots__/posts.test.ts.snap +6 -0
- package/tests/views/__snapshots__/profile.test.ts.snap +18 -0
- package/tests/views/__snapshots__/reposts.test.ts.snap +1 -0
- package/tests/views/__snapshots__/starter-packs.test.ts.snap +482 -0
- package/tests/views/__snapshots__/thread.test.ts.snap +22 -0
- package/tests/views/__snapshots__/threadgating.test.ts.snap +2 -0
- package/tests/views/__snapshots__/timeline.test.ts.snap +81 -0
- package/tests/views/starter-packs.test.ts +121 -0
package/src/proto/bsky_pb.ts
CHANGED
|
@@ -1833,6 +1833,128 @@ export class GetAllLabelersResponse extends Message<GetAllLabelersResponse> {
|
|
|
1833
1833
|
}
|
|
1834
1834
|
}
|
|
1835
1835
|
|
|
1836
|
+
/**
|
|
1837
|
+
* @generated from message bsky.GetStarterPackRecordsRequest
|
|
1838
|
+
*/
|
|
1839
|
+
export class GetStarterPackRecordsRequest extends Message<GetStarterPackRecordsRequest> {
|
|
1840
|
+
/**
|
|
1841
|
+
* @generated from field: repeated string uris = 1;
|
|
1842
|
+
*/
|
|
1843
|
+
uris: string[] = []
|
|
1844
|
+
|
|
1845
|
+
constructor(data?: PartialMessage<GetStarterPackRecordsRequest>) {
|
|
1846
|
+
super()
|
|
1847
|
+
proto3.util.initPartial(data, this)
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
static readonly runtime: typeof proto3 = proto3
|
|
1851
|
+
static readonly typeName = 'bsky.GetStarterPackRecordsRequest'
|
|
1852
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1853
|
+
{
|
|
1854
|
+
no: 1,
|
|
1855
|
+
name: 'uris',
|
|
1856
|
+
kind: 'scalar',
|
|
1857
|
+
T: 9 /* ScalarType.STRING */,
|
|
1858
|
+
repeated: true,
|
|
1859
|
+
},
|
|
1860
|
+
])
|
|
1861
|
+
|
|
1862
|
+
static fromBinary(
|
|
1863
|
+
bytes: Uint8Array,
|
|
1864
|
+
options?: Partial<BinaryReadOptions>,
|
|
1865
|
+
): GetStarterPackRecordsRequest {
|
|
1866
|
+
return new GetStarterPackRecordsRequest().fromBinary(bytes, options)
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
static fromJson(
|
|
1870
|
+
jsonValue: JsonValue,
|
|
1871
|
+
options?: Partial<JsonReadOptions>,
|
|
1872
|
+
): GetStarterPackRecordsRequest {
|
|
1873
|
+
return new GetStarterPackRecordsRequest().fromJson(jsonValue, options)
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
static fromJsonString(
|
|
1877
|
+
jsonString: string,
|
|
1878
|
+
options?: Partial<JsonReadOptions>,
|
|
1879
|
+
): GetStarterPackRecordsRequest {
|
|
1880
|
+
return new GetStarterPackRecordsRequest().fromJsonString(
|
|
1881
|
+
jsonString,
|
|
1882
|
+
options,
|
|
1883
|
+
)
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
static equals(
|
|
1887
|
+
a:
|
|
1888
|
+
| GetStarterPackRecordsRequest
|
|
1889
|
+
| PlainMessage<GetStarterPackRecordsRequest>
|
|
1890
|
+
| undefined,
|
|
1891
|
+
b:
|
|
1892
|
+
| GetStarterPackRecordsRequest
|
|
1893
|
+
| PlainMessage<GetStarterPackRecordsRequest>
|
|
1894
|
+
| undefined,
|
|
1895
|
+
): boolean {
|
|
1896
|
+
return proto3.util.equals(GetStarterPackRecordsRequest, a, b)
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
/**
|
|
1901
|
+
* @generated from message bsky.GetStarterPackRecordsResponse
|
|
1902
|
+
*/
|
|
1903
|
+
export class GetStarterPackRecordsResponse extends Message<GetStarterPackRecordsResponse> {
|
|
1904
|
+
/**
|
|
1905
|
+
* @generated from field: repeated bsky.Record records = 1;
|
|
1906
|
+
*/
|
|
1907
|
+
records: Record[] = []
|
|
1908
|
+
|
|
1909
|
+
constructor(data?: PartialMessage<GetStarterPackRecordsResponse>) {
|
|
1910
|
+
super()
|
|
1911
|
+
proto3.util.initPartial(data, this)
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
static readonly runtime: typeof proto3 = proto3
|
|
1915
|
+
static readonly typeName = 'bsky.GetStarterPackRecordsResponse'
|
|
1916
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1917
|
+
{ no: 1, name: 'records', kind: 'message', T: Record, repeated: true },
|
|
1918
|
+
])
|
|
1919
|
+
|
|
1920
|
+
static fromBinary(
|
|
1921
|
+
bytes: Uint8Array,
|
|
1922
|
+
options?: Partial<BinaryReadOptions>,
|
|
1923
|
+
): GetStarterPackRecordsResponse {
|
|
1924
|
+
return new GetStarterPackRecordsResponse().fromBinary(bytes, options)
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
static fromJson(
|
|
1928
|
+
jsonValue: JsonValue,
|
|
1929
|
+
options?: Partial<JsonReadOptions>,
|
|
1930
|
+
): GetStarterPackRecordsResponse {
|
|
1931
|
+
return new GetStarterPackRecordsResponse().fromJson(jsonValue, options)
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
static fromJsonString(
|
|
1935
|
+
jsonString: string,
|
|
1936
|
+
options?: Partial<JsonReadOptions>,
|
|
1937
|
+
): GetStarterPackRecordsResponse {
|
|
1938
|
+
return new GetStarterPackRecordsResponse().fromJsonString(
|
|
1939
|
+
jsonString,
|
|
1940
|
+
options,
|
|
1941
|
+
)
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
static equals(
|
|
1945
|
+
a:
|
|
1946
|
+
| GetStarterPackRecordsResponse
|
|
1947
|
+
| PlainMessage<GetStarterPackRecordsResponse>
|
|
1948
|
+
| undefined,
|
|
1949
|
+
b:
|
|
1950
|
+
| GetStarterPackRecordsResponse
|
|
1951
|
+
| PlainMessage<GetStarterPackRecordsResponse>
|
|
1952
|
+
| undefined,
|
|
1953
|
+
): boolean {
|
|
1954
|
+
return proto3.util.equals(GetStarterPackRecordsResponse, a, b)
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1836
1958
|
/**
|
|
1837
1959
|
* - Return follow uris where user A follows users B, C, D, …
|
|
1838
1960
|
* - E.g. for viewer state on `getProfiles`
|
|
@@ -3104,6 +3226,11 @@ export class GetCountsForUsersResponse extends Message<GetCountsForUsersResponse
|
|
|
3104
3226
|
*/
|
|
3105
3227
|
feeds: number[] = []
|
|
3106
3228
|
|
|
3229
|
+
/**
|
|
3230
|
+
* @generated from field: repeated int32 starter_packs = 7;
|
|
3231
|
+
*/
|
|
3232
|
+
starterPacks: number[] = []
|
|
3233
|
+
|
|
3107
3234
|
constructor(data?: PartialMessage<GetCountsForUsersResponse>) {
|
|
3108
3235
|
super()
|
|
3109
3236
|
proto3.util.initPartial(data, this)
|
|
@@ -3154,6 +3281,13 @@ export class GetCountsForUsersResponse extends Message<GetCountsForUsersResponse
|
|
|
3154
3281
|
T: 5 /* ScalarType.INT32 */,
|
|
3155
3282
|
repeated: true,
|
|
3156
3283
|
},
|
|
3284
|
+
{
|
|
3285
|
+
no: 7,
|
|
3286
|
+
name: 'starter_packs',
|
|
3287
|
+
kind: 'scalar',
|
|
3288
|
+
T: 5 /* ScalarType.INT32 */,
|
|
3289
|
+
repeated: true,
|
|
3290
|
+
},
|
|
3157
3291
|
])
|
|
3158
3292
|
|
|
3159
3293
|
static fromBinary(
|
|
@@ -3191,6 +3325,241 @@ export class GetCountsForUsersResponse extends Message<GetCountsForUsersResponse
|
|
|
3191
3325
|
}
|
|
3192
3326
|
}
|
|
3193
3327
|
|
|
3328
|
+
/**
|
|
3329
|
+
* @generated from message bsky.GetStarterPackCountsRequest
|
|
3330
|
+
*/
|
|
3331
|
+
export class GetStarterPackCountsRequest extends Message<GetStarterPackCountsRequest> {
|
|
3332
|
+
/**
|
|
3333
|
+
* @generated from field: repeated bsky.RecordRef refs = 1;
|
|
3334
|
+
*/
|
|
3335
|
+
refs: RecordRef[] = []
|
|
3336
|
+
|
|
3337
|
+
constructor(data?: PartialMessage<GetStarterPackCountsRequest>) {
|
|
3338
|
+
super()
|
|
3339
|
+
proto3.util.initPartial(data, this)
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3342
|
+
static readonly runtime: typeof proto3 = proto3
|
|
3343
|
+
static readonly typeName = 'bsky.GetStarterPackCountsRequest'
|
|
3344
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
3345
|
+
{ no: 1, name: 'refs', kind: 'message', T: RecordRef, repeated: true },
|
|
3346
|
+
])
|
|
3347
|
+
|
|
3348
|
+
static fromBinary(
|
|
3349
|
+
bytes: Uint8Array,
|
|
3350
|
+
options?: Partial<BinaryReadOptions>,
|
|
3351
|
+
): GetStarterPackCountsRequest {
|
|
3352
|
+
return new GetStarterPackCountsRequest().fromBinary(bytes, options)
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3355
|
+
static fromJson(
|
|
3356
|
+
jsonValue: JsonValue,
|
|
3357
|
+
options?: Partial<JsonReadOptions>,
|
|
3358
|
+
): GetStarterPackCountsRequest {
|
|
3359
|
+
return new GetStarterPackCountsRequest().fromJson(jsonValue, options)
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3362
|
+
static fromJsonString(
|
|
3363
|
+
jsonString: string,
|
|
3364
|
+
options?: Partial<JsonReadOptions>,
|
|
3365
|
+
): GetStarterPackCountsRequest {
|
|
3366
|
+
return new GetStarterPackCountsRequest().fromJsonString(jsonString, options)
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3369
|
+
static equals(
|
|
3370
|
+
a:
|
|
3371
|
+
| GetStarterPackCountsRequest
|
|
3372
|
+
| PlainMessage<GetStarterPackCountsRequest>
|
|
3373
|
+
| undefined,
|
|
3374
|
+
b:
|
|
3375
|
+
| GetStarterPackCountsRequest
|
|
3376
|
+
| PlainMessage<GetStarterPackCountsRequest>
|
|
3377
|
+
| undefined,
|
|
3378
|
+
): boolean {
|
|
3379
|
+
return proto3.util.equals(GetStarterPackCountsRequest, a, b)
|
|
3380
|
+
}
|
|
3381
|
+
}
|
|
3382
|
+
|
|
3383
|
+
/**
|
|
3384
|
+
* @generated from message bsky.GetStarterPackCountsResponse
|
|
3385
|
+
*/
|
|
3386
|
+
export class GetStarterPackCountsResponse extends Message<GetStarterPackCountsResponse> {
|
|
3387
|
+
/**
|
|
3388
|
+
* @generated from field: repeated int32 joined_week = 1;
|
|
3389
|
+
*/
|
|
3390
|
+
joinedWeek: number[] = []
|
|
3391
|
+
|
|
3392
|
+
/**
|
|
3393
|
+
* @generated from field: repeated int32 joined_all_time = 2;
|
|
3394
|
+
*/
|
|
3395
|
+
joinedAllTime: number[] = []
|
|
3396
|
+
|
|
3397
|
+
constructor(data?: PartialMessage<GetStarterPackCountsResponse>) {
|
|
3398
|
+
super()
|
|
3399
|
+
proto3.util.initPartial(data, this)
|
|
3400
|
+
}
|
|
3401
|
+
|
|
3402
|
+
static readonly runtime: typeof proto3 = proto3
|
|
3403
|
+
static readonly typeName = 'bsky.GetStarterPackCountsResponse'
|
|
3404
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
3405
|
+
{
|
|
3406
|
+
no: 1,
|
|
3407
|
+
name: 'joined_week',
|
|
3408
|
+
kind: 'scalar',
|
|
3409
|
+
T: 5 /* ScalarType.INT32 */,
|
|
3410
|
+
repeated: true,
|
|
3411
|
+
},
|
|
3412
|
+
{
|
|
3413
|
+
no: 2,
|
|
3414
|
+
name: 'joined_all_time',
|
|
3415
|
+
kind: 'scalar',
|
|
3416
|
+
T: 5 /* ScalarType.INT32 */,
|
|
3417
|
+
repeated: true,
|
|
3418
|
+
},
|
|
3419
|
+
])
|
|
3420
|
+
|
|
3421
|
+
static fromBinary(
|
|
3422
|
+
bytes: Uint8Array,
|
|
3423
|
+
options?: Partial<BinaryReadOptions>,
|
|
3424
|
+
): GetStarterPackCountsResponse {
|
|
3425
|
+
return new GetStarterPackCountsResponse().fromBinary(bytes, options)
|
|
3426
|
+
}
|
|
3427
|
+
|
|
3428
|
+
static fromJson(
|
|
3429
|
+
jsonValue: JsonValue,
|
|
3430
|
+
options?: Partial<JsonReadOptions>,
|
|
3431
|
+
): GetStarterPackCountsResponse {
|
|
3432
|
+
return new GetStarterPackCountsResponse().fromJson(jsonValue, options)
|
|
3433
|
+
}
|
|
3434
|
+
|
|
3435
|
+
static fromJsonString(
|
|
3436
|
+
jsonString: string,
|
|
3437
|
+
options?: Partial<JsonReadOptions>,
|
|
3438
|
+
): GetStarterPackCountsResponse {
|
|
3439
|
+
return new GetStarterPackCountsResponse().fromJsonString(
|
|
3440
|
+
jsonString,
|
|
3441
|
+
options,
|
|
3442
|
+
)
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
static equals(
|
|
3446
|
+
a:
|
|
3447
|
+
| GetStarterPackCountsResponse
|
|
3448
|
+
| PlainMessage<GetStarterPackCountsResponse>
|
|
3449
|
+
| undefined,
|
|
3450
|
+
b:
|
|
3451
|
+
| GetStarterPackCountsResponse
|
|
3452
|
+
| PlainMessage<GetStarterPackCountsResponse>
|
|
3453
|
+
| undefined,
|
|
3454
|
+
): boolean {
|
|
3455
|
+
return proto3.util.equals(GetStarterPackCountsResponse, a, b)
|
|
3456
|
+
}
|
|
3457
|
+
}
|
|
3458
|
+
|
|
3459
|
+
/**
|
|
3460
|
+
* @generated from message bsky.GetListCountsRequest
|
|
3461
|
+
*/
|
|
3462
|
+
export class GetListCountsRequest extends Message<GetListCountsRequest> {
|
|
3463
|
+
/**
|
|
3464
|
+
* @generated from field: repeated bsky.RecordRef refs = 1;
|
|
3465
|
+
*/
|
|
3466
|
+
refs: RecordRef[] = []
|
|
3467
|
+
|
|
3468
|
+
constructor(data?: PartialMessage<GetListCountsRequest>) {
|
|
3469
|
+
super()
|
|
3470
|
+
proto3.util.initPartial(data, this)
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
static readonly runtime: typeof proto3 = proto3
|
|
3474
|
+
static readonly typeName = 'bsky.GetListCountsRequest'
|
|
3475
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
3476
|
+
{ no: 1, name: 'refs', kind: 'message', T: RecordRef, repeated: true },
|
|
3477
|
+
])
|
|
3478
|
+
|
|
3479
|
+
static fromBinary(
|
|
3480
|
+
bytes: Uint8Array,
|
|
3481
|
+
options?: Partial<BinaryReadOptions>,
|
|
3482
|
+
): GetListCountsRequest {
|
|
3483
|
+
return new GetListCountsRequest().fromBinary(bytes, options)
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
static fromJson(
|
|
3487
|
+
jsonValue: JsonValue,
|
|
3488
|
+
options?: Partial<JsonReadOptions>,
|
|
3489
|
+
): GetListCountsRequest {
|
|
3490
|
+
return new GetListCountsRequest().fromJson(jsonValue, options)
|
|
3491
|
+
}
|
|
3492
|
+
|
|
3493
|
+
static fromJsonString(
|
|
3494
|
+
jsonString: string,
|
|
3495
|
+
options?: Partial<JsonReadOptions>,
|
|
3496
|
+
): GetListCountsRequest {
|
|
3497
|
+
return new GetListCountsRequest().fromJsonString(jsonString, options)
|
|
3498
|
+
}
|
|
3499
|
+
|
|
3500
|
+
static equals(
|
|
3501
|
+
a: GetListCountsRequest | PlainMessage<GetListCountsRequest> | undefined,
|
|
3502
|
+
b: GetListCountsRequest | PlainMessage<GetListCountsRequest> | undefined,
|
|
3503
|
+
): boolean {
|
|
3504
|
+
return proto3.util.equals(GetListCountsRequest, a, b)
|
|
3505
|
+
}
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3508
|
+
/**
|
|
3509
|
+
* @generated from message bsky.GetListCountsResponse
|
|
3510
|
+
*/
|
|
3511
|
+
export class GetListCountsResponse extends Message<GetListCountsResponse> {
|
|
3512
|
+
/**
|
|
3513
|
+
* @generated from field: repeated int32 list_items = 1;
|
|
3514
|
+
*/
|
|
3515
|
+
listItems: number[] = []
|
|
3516
|
+
|
|
3517
|
+
constructor(data?: PartialMessage<GetListCountsResponse>) {
|
|
3518
|
+
super()
|
|
3519
|
+
proto3.util.initPartial(data, this)
|
|
3520
|
+
}
|
|
3521
|
+
|
|
3522
|
+
static readonly runtime: typeof proto3 = proto3
|
|
3523
|
+
static readonly typeName = 'bsky.GetListCountsResponse'
|
|
3524
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
3525
|
+
{
|
|
3526
|
+
no: 1,
|
|
3527
|
+
name: 'list_items',
|
|
3528
|
+
kind: 'scalar',
|
|
3529
|
+
T: 5 /* ScalarType.INT32 */,
|
|
3530
|
+
repeated: true,
|
|
3531
|
+
},
|
|
3532
|
+
])
|
|
3533
|
+
|
|
3534
|
+
static fromBinary(
|
|
3535
|
+
bytes: Uint8Array,
|
|
3536
|
+
options?: Partial<BinaryReadOptions>,
|
|
3537
|
+
): GetListCountsResponse {
|
|
3538
|
+
return new GetListCountsResponse().fromBinary(bytes, options)
|
|
3539
|
+
}
|
|
3540
|
+
|
|
3541
|
+
static fromJson(
|
|
3542
|
+
jsonValue: JsonValue,
|
|
3543
|
+
options?: Partial<JsonReadOptions>,
|
|
3544
|
+
): GetListCountsResponse {
|
|
3545
|
+
return new GetListCountsResponse().fromJson(jsonValue, options)
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
static fromJsonString(
|
|
3549
|
+
jsonString: string,
|
|
3550
|
+
options?: Partial<JsonReadOptions>,
|
|
3551
|
+
): GetListCountsResponse {
|
|
3552
|
+
return new GetListCountsResponse().fromJsonString(jsonString, options)
|
|
3553
|
+
}
|
|
3554
|
+
|
|
3555
|
+
static equals(
|
|
3556
|
+
a: GetListCountsResponse | PlainMessage<GetListCountsResponse> | undefined,
|
|
3557
|
+
b: GetListCountsResponse | PlainMessage<GetListCountsResponse> | undefined,
|
|
3558
|
+
): boolean {
|
|
3559
|
+
return proto3.util.equals(GetListCountsResponse, a, b)
|
|
3560
|
+
}
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3194
3563
|
/**
|
|
3195
3564
|
* - return repost uris where subject uri is subject A
|
|
3196
3565
|
* - `getReposts` list for a post
|
|
@@ -3765,6 +4134,11 @@ export class ActorInfo extends Message<ActorInfo> {
|
|
|
3765
4134
|
*/
|
|
3766
4135
|
upstreamStatus = ''
|
|
3767
4136
|
|
|
4137
|
+
/**
|
|
4138
|
+
* @generated from field: google.protobuf.Timestamp created_at = 10;
|
|
4139
|
+
*/
|
|
4140
|
+
createdAt?: Timestamp
|
|
4141
|
+
|
|
3768
4142
|
constructor(data?: PartialMessage<ActorInfo>) {
|
|
3769
4143
|
super()
|
|
3770
4144
|
proto3.util.initPartial(data, this)
|
|
@@ -3797,6 +4171,7 @@ export class ActorInfo extends Message<ActorInfo> {
|
|
|
3797
4171
|
kind: 'scalar',
|
|
3798
4172
|
T: 9 /* ScalarType.STRING */,
|
|
3799
4173
|
},
|
|
4174
|
+
{ no: 10, name: 'created_at', kind: 'message', T: Timestamp },
|
|
3800
4175
|
])
|
|
3801
4176
|
|
|
3802
4177
|
static fromBinary(
|
|
@@ -9204,6 +9579,143 @@ export class GetLabelsResponse extends Message<GetLabelsResponse> {
|
|
|
9204
9579
|
}
|
|
9205
9580
|
}
|
|
9206
9581
|
|
|
9582
|
+
/**
|
|
9583
|
+
* @generated from message bsky.GetActorStarterPacksRequest
|
|
9584
|
+
*/
|
|
9585
|
+
export class GetActorStarterPacksRequest extends Message<GetActorStarterPacksRequest> {
|
|
9586
|
+
/**
|
|
9587
|
+
* @generated from field: string actor_did = 1;
|
|
9588
|
+
*/
|
|
9589
|
+
actorDid = ''
|
|
9590
|
+
|
|
9591
|
+
/**
|
|
9592
|
+
* @generated from field: int32 limit = 2;
|
|
9593
|
+
*/
|
|
9594
|
+
limit = 0
|
|
9595
|
+
|
|
9596
|
+
/**
|
|
9597
|
+
* @generated from field: string cursor = 3;
|
|
9598
|
+
*/
|
|
9599
|
+
cursor = ''
|
|
9600
|
+
|
|
9601
|
+
constructor(data?: PartialMessage<GetActorStarterPacksRequest>) {
|
|
9602
|
+
super()
|
|
9603
|
+
proto3.util.initPartial(data, this)
|
|
9604
|
+
}
|
|
9605
|
+
|
|
9606
|
+
static readonly runtime: typeof proto3 = proto3
|
|
9607
|
+
static readonly typeName = 'bsky.GetActorStarterPacksRequest'
|
|
9608
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
9609
|
+
{ no: 1, name: 'actor_did', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
|
|
9610
|
+
{ no: 2, name: 'limit', kind: 'scalar', T: 5 /* ScalarType.INT32 */ },
|
|
9611
|
+
{ no: 3, name: 'cursor', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
|
|
9612
|
+
])
|
|
9613
|
+
|
|
9614
|
+
static fromBinary(
|
|
9615
|
+
bytes: Uint8Array,
|
|
9616
|
+
options?: Partial<BinaryReadOptions>,
|
|
9617
|
+
): GetActorStarterPacksRequest {
|
|
9618
|
+
return new GetActorStarterPacksRequest().fromBinary(bytes, options)
|
|
9619
|
+
}
|
|
9620
|
+
|
|
9621
|
+
static fromJson(
|
|
9622
|
+
jsonValue: JsonValue,
|
|
9623
|
+
options?: Partial<JsonReadOptions>,
|
|
9624
|
+
): GetActorStarterPacksRequest {
|
|
9625
|
+
return new GetActorStarterPacksRequest().fromJson(jsonValue, options)
|
|
9626
|
+
}
|
|
9627
|
+
|
|
9628
|
+
static fromJsonString(
|
|
9629
|
+
jsonString: string,
|
|
9630
|
+
options?: Partial<JsonReadOptions>,
|
|
9631
|
+
): GetActorStarterPacksRequest {
|
|
9632
|
+
return new GetActorStarterPacksRequest().fromJsonString(jsonString, options)
|
|
9633
|
+
}
|
|
9634
|
+
|
|
9635
|
+
static equals(
|
|
9636
|
+
a:
|
|
9637
|
+
| GetActorStarterPacksRequest
|
|
9638
|
+
| PlainMessage<GetActorStarterPacksRequest>
|
|
9639
|
+
| undefined,
|
|
9640
|
+
b:
|
|
9641
|
+
| GetActorStarterPacksRequest
|
|
9642
|
+
| PlainMessage<GetActorStarterPacksRequest>
|
|
9643
|
+
| undefined,
|
|
9644
|
+
): boolean {
|
|
9645
|
+
return proto3.util.equals(GetActorStarterPacksRequest, a, b)
|
|
9646
|
+
}
|
|
9647
|
+
}
|
|
9648
|
+
|
|
9649
|
+
/**
|
|
9650
|
+
* @generated from message bsky.GetActorStarterPacksResponse
|
|
9651
|
+
*/
|
|
9652
|
+
export class GetActorStarterPacksResponse extends Message<GetActorStarterPacksResponse> {
|
|
9653
|
+
/**
|
|
9654
|
+
* @generated from field: repeated string uris = 1;
|
|
9655
|
+
*/
|
|
9656
|
+
uris: string[] = []
|
|
9657
|
+
|
|
9658
|
+
/**
|
|
9659
|
+
* @generated from field: string cursor = 2;
|
|
9660
|
+
*/
|
|
9661
|
+
cursor = ''
|
|
9662
|
+
|
|
9663
|
+
constructor(data?: PartialMessage<GetActorStarterPacksResponse>) {
|
|
9664
|
+
super()
|
|
9665
|
+
proto3.util.initPartial(data, this)
|
|
9666
|
+
}
|
|
9667
|
+
|
|
9668
|
+
static readonly runtime: typeof proto3 = proto3
|
|
9669
|
+
static readonly typeName = 'bsky.GetActorStarterPacksResponse'
|
|
9670
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
9671
|
+
{
|
|
9672
|
+
no: 1,
|
|
9673
|
+
name: 'uris',
|
|
9674
|
+
kind: 'scalar',
|
|
9675
|
+
T: 9 /* ScalarType.STRING */,
|
|
9676
|
+
repeated: true,
|
|
9677
|
+
},
|
|
9678
|
+
{ no: 2, name: 'cursor', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
|
|
9679
|
+
])
|
|
9680
|
+
|
|
9681
|
+
static fromBinary(
|
|
9682
|
+
bytes: Uint8Array,
|
|
9683
|
+
options?: Partial<BinaryReadOptions>,
|
|
9684
|
+
): GetActorStarterPacksResponse {
|
|
9685
|
+
return new GetActorStarterPacksResponse().fromBinary(bytes, options)
|
|
9686
|
+
}
|
|
9687
|
+
|
|
9688
|
+
static fromJson(
|
|
9689
|
+
jsonValue: JsonValue,
|
|
9690
|
+
options?: Partial<JsonReadOptions>,
|
|
9691
|
+
): GetActorStarterPacksResponse {
|
|
9692
|
+
return new GetActorStarterPacksResponse().fromJson(jsonValue, options)
|
|
9693
|
+
}
|
|
9694
|
+
|
|
9695
|
+
static fromJsonString(
|
|
9696
|
+
jsonString: string,
|
|
9697
|
+
options?: Partial<JsonReadOptions>,
|
|
9698
|
+
): GetActorStarterPacksResponse {
|
|
9699
|
+
return new GetActorStarterPacksResponse().fromJsonString(
|
|
9700
|
+
jsonString,
|
|
9701
|
+
options,
|
|
9702
|
+
)
|
|
9703
|
+
}
|
|
9704
|
+
|
|
9705
|
+
static equals(
|
|
9706
|
+
a:
|
|
9707
|
+
| GetActorStarterPacksResponse
|
|
9708
|
+
| PlainMessage<GetActorStarterPacksResponse>
|
|
9709
|
+
| undefined,
|
|
9710
|
+
b:
|
|
9711
|
+
| GetActorStarterPacksResponse
|
|
9712
|
+
| PlainMessage<GetActorStarterPacksResponse>
|
|
9713
|
+
| undefined,
|
|
9714
|
+
): boolean {
|
|
9715
|
+
return proto3.util.equals(GetActorStarterPacksResponse, a, b)
|
|
9716
|
+
}
|
|
9717
|
+
}
|
|
9718
|
+
|
|
9207
9719
|
/**
|
|
9208
9720
|
* - Latest repo rev of user w/ DID
|
|
9209
9721
|
* - Read-after-write header in`getProfile`, `getProfiles`, `getActorLikes`, `getAuthorFeed`, `getListFeed`, `getPostThread`, `getTimeline`. Could it be view dependent?
|
package/src/views/index.ts
CHANGED
|
@@ -23,7 +23,12 @@ import {
|
|
|
23
23
|
isPostView,
|
|
24
24
|
} from '../lexicon/types/app/bsky/feed/defs'
|
|
25
25
|
import { isRecord as isPostRecord } from '../lexicon/types/app/bsky/feed/post'
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
ListView,
|
|
28
|
+
ListViewBasic,
|
|
29
|
+
StarterPackView,
|
|
30
|
+
StarterPackViewBasic,
|
|
31
|
+
} from '../lexicon/types/app/bsky/graph/defs'
|
|
27
32
|
import { creatorFromUri, parseThreadGate, cidFromBlobJson } from './util'
|
|
28
33
|
import { isListRule } from '../lexicon/types/app/bsky/feed/threadgate'
|
|
29
34
|
import { isSelfLabels } from '../lexicon/types/com/atproto/label/defs'
|
|
@@ -134,12 +139,16 @@ export class Views {
|
|
|
134
139
|
associated: {
|
|
135
140
|
lists: profileAggs?.lists,
|
|
136
141
|
feedgens: profileAggs?.feeds,
|
|
142
|
+
starterPacks: profileAggs?.starterPacks,
|
|
137
143
|
labeler: actor.isLabeler,
|
|
138
144
|
// @TODO apply default chat policy?
|
|
139
145
|
chat: actor.allowIncomingChatsFrom
|
|
140
146
|
? { allowIncoming: actor.allowIncomingChatsFrom }
|
|
141
147
|
: undefined,
|
|
142
148
|
},
|
|
149
|
+
joinedViaStarterPack: actor.profile?.joinedViaStarterPack
|
|
150
|
+
? this.starterPackBasic(actor.profile.joinedViaStarterPack.uri, state)
|
|
151
|
+
: undefined,
|
|
143
152
|
}
|
|
144
153
|
}
|
|
145
154
|
|
|
@@ -200,6 +209,30 @@ export class Views {
|
|
|
200
209
|
: undefined,
|
|
201
210
|
viewer: this.profileViewer(did, state),
|
|
202
211
|
labels,
|
|
212
|
+
createdAt: actor.createdAt?.toISOString(),
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
profileKnownFollowers(
|
|
217
|
+
did: string,
|
|
218
|
+
state: HydrationState,
|
|
219
|
+
): ProfileView | undefined {
|
|
220
|
+
const actor = state.actors?.get(did)
|
|
221
|
+
if (!actor) return
|
|
222
|
+
const baseView = this.profile(did, state)
|
|
223
|
+
if (!baseView) return
|
|
224
|
+
const knownFollowersSkeleton = state.knownFollowers?.get(did)
|
|
225
|
+
const knownFollowers = knownFollowersSkeleton
|
|
226
|
+
? this.knownFollowers(knownFollowersSkeleton, state)
|
|
227
|
+
: undefined
|
|
228
|
+
return {
|
|
229
|
+
...baseView,
|
|
230
|
+
viewer: baseView.viewer
|
|
231
|
+
? {
|
|
232
|
+
...baseView.viewer,
|
|
233
|
+
knownFollowers,
|
|
234
|
+
}
|
|
235
|
+
: undefined,
|
|
203
236
|
}
|
|
204
237
|
}
|
|
205
238
|
|
|
@@ -235,6 +268,10 @@ export class Views {
|
|
|
235
268
|
if (this.viewerBlockExists(did, state)) {
|
|
236
269
|
return undefined
|
|
237
270
|
}
|
|
271
|
+
if (this.actorIsNoHosted(did, state)) {
|
|
272
|
+
// @TODO only needed right now to work around getProfile's { includeTakedowns: true }
|
|
273
|
+
return undefined
|
|
274
|
+
}
|
|
238
275
|
return this.profileBasic(did, state)
|
|
239
276
|
})
|
|
240
277
|
return { count: knownFollowers.count, followers }
|
|
@@ -280,6 +317,7 @@ export class Views {
|
|
|
280
317
|
if (!list) {
|
|
281
318
|
return undefined
|
|
282
319
|
}
|
|
320
|
+
const listAgg = state.listAggs?.get(uri)
|
|
283
321
|
const listViewer = state.listViewers?.get(uri)
|
|
284
322
|
const labels = state.labels?.getBySubject(uri) ?? []
|
|
285
323
|
const creator = new AtUri(uri).hostname
|
|
@@ -295,6 +333,7 @@ export class Views {
|
|
|
295
333
|
cidFromBlobJson(list.record.avatar),
|
|
296
334
|
)
|
|
297
335
|
: undefined,
|
|
336
|
+
listItemCount: listAgg?.listItems ?? 0,
|
|
298
337
|
indexedAt: list.sortedAt.toISOString(),
|
|
299
338
|
labels,
|
|
300
339
|
viewer: listViewer
|
|
@@ -306,6 +345,53 @@ export class Views {
|
|
|
306
345
|
}
|
|
307
346
|
}
|
|
308
347
|
|
|
348
|
+
starterPackBasic(
|
|
349
|
+
uri: string,
|
|
350
|
+
state: HydrationState,
|
|
351
|
+
): StarterPackViewBasic | undefined {
|
|
352
|
+
const sp = state.starterPacks?.get(uri)
|
|
353
|
+
if (!sp) return
|
|
354
|
+
const parsedUri = new AtUri(uri)
|
|
355
|
+
const creator = this.profileBasic(parsedUri.hostname, state)
|
|
356
|
+
if (!creator) return
|
|
357
|
+
const agg = state.starterPackAggs?.get(uri)
|
|
358
|
+
const labels = state.labels?.getBySubject(uri) ?? []
|
|
359
|
+
return {
|
|
360
|
+
uri,
|
|
361
|
+
cid: sp.cid,
|
|
362
|
+
record: sp.record,
|
|
363
|
+
creator,
|
|
364
|
+
joinedAllTimeCount: agg?.joinedAllTime ?? 0,
|
|
365
|
+
joinedWeekCount: agg?.joinedWeek ?? 0,
|
|
366
|
+
labels,
|
|
367
|
+
indexedAt: sp.sortedAt.toISOString(),
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
starterPack(uri: string, state: HydrationState): StarterPackView | undefined {
|
|
372
|
+
const sp = state.starterPacks?.get(uri)
|
|
373
|
+
const basicView = this.starterPackBasic(uri, state)
|
|
374
|
+
if (!sp || !basicView) return
|
|
375
|
+
const agg = state.starterPackAggs?.get(uri)
|
|
376
|
+
const feeds = mapDefined(sp.record.feeds ?? [], (feed) =>
|
|
377
|
+
this.feedGenerator(feed.uri, state),
|
|
378
|
+
)
|
|
379
|
+
const list = this.listBasic(sp.record.list, state)
|
|
380
|
+
const listItemsSample = mapDefined(agg?.listItemSampleUris ?? [], (uri) => {
|
|
381
|
+
const li = state.listItems?.get(uri)
|
|
382
|
+
if (!li) return
|
|
383
|
+
const subject = this.profile(li.record.subject, state)
|
|
384
|
+
if (!subject) return
|
|
385
|
+
return { uri, subject }
|
|
386
|
+
})
|
|
387
|
+
return {
|
|
388
|
+
...basicView,
|
|
389
|
+
feeds,
|
|
390
|
+
list,
|
|
391
|
+
listItemsSample,
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
309
395
|
// Labels
|
|
310
396
|
// ------------
|
|
311
397
|
|
|
@@ -965,6 +1051,17 @@ export class Views {
|
|
|
965
1051
|
recordInfo = state.reposts?.get(notif.uri)
|
|
966
1052
|
} else if (uri.collection === ids.AppBskyGraphFollow) {
|
|
967
1053
|
recordInfo = state.follows?.get(notif.uri)
|
|
1054
|
+
} else if (uri.collection === ids.AppBskyActorProfile) {
|
|
1055
|
+
const actor = state.actors?.get(authorDid)
|
|
1056
|
+
recordInfo =
|
|
1057
|
+
actor && actor.profile && actor.profileCid && actor.sortedAt
|
|
1058
|
+
? {
|
|
1059
|
+
record: actor.profile,
|
|
1060
|
+
cid: actor.profileCid,
|
|
1061
|
+
sortedAt: actor.sortedAt,
|
|
1062
|
+
takedownRef: actor.profileTakedownRef,
|
|
1063
|
+
}
|
|
1064
|
+
: null
|
|
968
1065
|
}
|
|
969
1066
|
if (!recordInfo) return
|
|
970
1067
|
const labels = state.labels?.getBySubject(notif.uri) ?? []
|