@atproto/bsky 0.0.43 → 0.0.45
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/actor/searchActors.js +1 -0
- package/dist/api/app/bsky/actor/searchActors.js.map +1 -1
- package/dist/api/app/bsky/actor/searchActorsTypeahead.js +1 -0
- package/dist/api/app/bsky/actor/searchActorsTypeahead.js.map +1 -1
- package/dist/api/app/bsky/feed/getAuthorFeed.d.ts +1 -0
- package/dist/api/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getAuthorFeed.js +84 -4
- package/dist/api/app/bsky/feed/getAuthorFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/searchPosts.js +10 -0
- package/dist/api/app/bsky/feed/searchPosts.js.map +1 -1
- package/dist/api/app/bsky/notification/registerPush.js.map +1 -1
- package/dist/auth-verifier.d.ts.map +1 -1
- package/dist/auth-verifier.js.map +1 -1
- package/dist/cache/read-through.d.ts.map +1 -1
- package/dist/cache/read-through.js.map +1 -1
- package/dist/data-plane/server/db/pagination.d.ts +5 -5
- package/dist/data-plane/server/db/pagination.d.ts.map +1 -1
- package/dist/data-plane/server/db/pagination.js.map +1 -1
- package/dist/data-plane/server/index.d.ts.map +1 -1
- package/dist/data-plane/server/index.js.map +1 -1
- package/dist/data-plane/server/indexing/index.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/index.js.map +1 -1
- package/dist/data-plane/server/routes/records.d.ts.map +1 -1
- package/dist/data-plane/server/subscription/index.d.ts.map +1 -1
- package/dist/data-plane/server/subscription/index.js.map +1 -1
- package/dist/data-plane/server/subscription/util.d.ts.map +1 -1
- package/dist/data-plane/server/subscription/util.js.map +1 -1
- package/dist/data-plane/server/util.d.ts.map +1 -1
- package/dist/hydration/actor.d.ts.map +1 -1
- package/dist/hydration/actor.js.map +1 -1
- package/dist/hydration/graph.d.ts.map +1 -1
- package/dist/hydration/graph.js.map +1 -1
- package/dist/hydration/hydrator.d.ts.map +1 -1
- package/dist/hydration/hydrator.js +8 -1
- package/dist/hydration/hydrator.js.map +1 -1
- package/dist/hydration/util.d.ts.map +1 -1
- package/dist/image/server.d.ts.map +1 -1
- package/dist/image/server.js.map +1 -1
- package/dist/lexicon/index.d.ts +16 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +19 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +244 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +258 -1
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/record.d.ts +3 -0
- package/dist/lexicon/types/app/bsky/embed/record.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/record.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +38 -0
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.js +35 -1
- package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/generator.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/feed/generator.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/generator.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/searchPosts.d.ts +18 -0
- package/dist/lexicon/types/app/bsky/feed/searchPosts.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/sendInteractions.d.ts +40 -0
- package/dist/lexicon/types/app/bsky/feed/sendInteractions.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/feed/sendInteractions.js +3 -0
- package/dist/lexicon/types/app/bsky/feed/sendInteractions.js.map +1 -0
- package/dist/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.d.ts +20 -0
- package/dist/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/util/debug.d.ts.map +1 -1
- package/dist/views/index.d.ts +2 -2
- package/dist/views/index.d.ts.map +1 -1
- package/dist/views/index.js +29 -22
- package/dist/views/index.js.map +1 -1
- package/package.json +5 -5
- package/src/api/app/bsky/actor/searchActors.ts +1 -0
- package/src/api/app/bsky/actor/searchActorsTypeahead.ts +1 -0
- package/src/api/app/bsky/feed/getAuthorFeed.ts +80 -5
- package/src/api/app/bsky/feed/searchPosts.ts +10 -0
- package/src/api/app/bsky/notification/registerPush.ts +2 -2
- package/src/auth-verifier.ts +4 -1
- package/src/cache/read-through.ts +13 -7
- package/src/data-plane/server/db/pagination.ts +4 -1
- package/src/data-plane/server/index.ts +4 -1
- package/src/data-plane/server/indexing/index.ts +10 -7
- package/src/data-plane/server/subscription/index.ts +2 -3
- package/src/data-plane/server/subscription/util.ts +4 -1
- package/src/hydration/actor.ts +10 -7
- package/src/hydration/graph.ts +8 -5
- package/src/hydration/hydrator.ts +9 -1
- package/src/image/server.ts +4 -1
- package/src/lexicon/index.ts +26 -0
- package/src/lexicon/lexicons.ts +285 -1
- package/src/lexicon/types/app/bsky/embed/record.ts +3 -0
- package/src/lexicon/types/app/bsky/feed/defs.ts +63 -0
- package/src/lexicon/types/app/bsky/feed/generator.ts +2 -0
- package/src/lexicon/types/app/bsky/feed/searchPosts.ts +18 -0
- package/src/lexicon/types/app/bsky/feed/sendInteractions.ts +49 -0
- package/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts +2 -0
- package/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts +20 -0
- package/src/lexicon/types/com/atproto/sync/getRecord.ts +1 -1
- package/src/views/index.ts +27 -30
- package/tests/__snapshots__/feed-generation.test.ts.snap +15 -0
- package/tests/_util.ts +4 -4
- package/tests/data-plane/__snapshots__/indexing.test.ts.snap +6 -0
- package/tests/views/__snapshots__/actor-search.test.ts.snap +2 -2
- package/tests/views/__snapshots__/author-feed.test.ts.snap +27 -0
- package/tests/views/__snapshots__/block-lists.test.ts.snap +3 -0
- package/tests/views/__snapshots__/blocks.test.ts.snap +3 -0
- package/tests/views/__snapshots__/list-feed.test.ts.snap +6 -0
- package/tests/views/__snapshots__/posts.test.ts.snap +9 -0
- package/tests/views/__snapshots__/timeline.test.ts.snap +259 -0
- package/tests/views/actor-search.test.ts +3 -3
- package/tests/views/author-feed.test.ts +41 -5
- package/tests/views/blocks.test.ts +11 -2
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -1067,6 +1067,8 @@ export const schemaDict = {
|
|
|
1067
1067
|
},
|
|
1068
1068
|
reason: {
|
|
1069
1069
|
type: 'string',
|
|
1070
|
+
maxGraphemes: 2000,
|
|
1071
|
+
maxLength: 20000,
|
|
1070
1072
|
description:
|
|
1071
1073
|
'Additional context about the content and violation.',
|
|
1072
1074
|
},
|
|
@@ -2438,9 +2440,11 @@ export const schemaDict = {
|
|
|
2438
2440
|
properties: {
|
|
2439
2441
|
privacyPolicy: {
|
|
2440
2442
|
type: 'string',
|
|
2443
|
+
format: 'uri',
|
|
2441
2444
|
},
|
|
2442
2445
|
termsOfService: {
|
|
2443
2446
|
type: 'string',
|
|
2447
|
+
format: 'uri',
|
|
2444
2448
|
},
|
|
2445
2449
|
},
|
|
2446
2450
|
},
|
|
@@ -3052,7 +3056,8 @@ export const schemaDict = {
|
|
|
3052
3056
|
commit: {
|
|
3053
3057
|
type: 'string',
|
|
3054
3058
|
format: 'cid',
|
|
3055
|
-
description:
|
|
3059
|
+
description:
|
|
3060
|
+
'DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit',
|
|
3056
3061
|
},
|
|
3057
3062
|
},
|
|
3058
3063
|
},
|
|
@@ -3621,6 +3626,7 @@ export const schemaDict = {
|
|
|
3621
3626
|
},
|
|
3622
3627
|
avatar: {
|
|
3623
3628
|
type: 'string',
|
|
3629
|
+
format: 'uri',
|
|
3624
3630
|
},
|
|
3625
3631
|
associated: {
|
|
3626
3632
|
type: 'ref',
|
|
@@ -3663,6 +3669,7 @@ export const schemaDict = {
|
|
|
3663
3669
|
},
|
|
3664
3670
|
avatar: {
|
|
3665
3671
|
type: 'string',
|
|
3672
|
+
format: 'uri',
|
|
3666
3673
|
},
|
|
3667
3674
|
associated: {
|
|
3668
3675
|
type: 'ref',
|
|
@@ -3709,9 +3716,11 @@ export const schemaDict = {
|
|
|
3709
3716
|
},
|
|
3710
3717
|
avatar: {
|
|
3711
3718
|
type: 'string',
|
|
3719
|
+
format: 'uri',
|
|
3712
3720
|
},
|
|
3713
3721
|
banner: {
|
|
3714
3722
|
type: 'string',
|
|
3723
|
+
format: 'uri',
|
|
3715
3724
|
},
|
|
3716
3725
|
followersCount: {
|
|
3717
3726
|
type: 'integer',
|
|
@@ -4388,6 +4397,7 @@ export const schemaDict = {
|
|
|
4388
4397
|
},
|
|
4389
4398
|
thumb: {
|
|
4390
4399
|
type: 'string',
|
|
4400
|
+
format: 'uri',
|
|
4391
4401
|
},
|
|
4392
4402
|
},
|
|
4393
4403
|
},
|
|
@@ -4468,11 +4478,13 @@ export const schemaDict = {
|
|
|
4468
4478
|
properties: {
|
|
4469
4479
|
thumb: {
|
|
4470
4480
|
type: 'string',
|
|
4481
|
+
format: 'uri',
|
|
4471
4482
|
description:
|
|
4472
4483
|
'Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.',
|
|
4473
4484
|
},
|
|
4474
4485
|
fullsize: {
|
|
4475
4486
|
type: 'string',
|
|
4487
|
+
format: 'uri',
|
|
4476
4488
|
description:
|
|
4477
4489
|
'Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.',
|
|
4478
4490
|
},
|
|
@@ -4549,6 +4561,15 @@ export const schemaDict = {
|
|
|
4549
4561
|
ref: 'lex:com.atproto.label.defs#label',
|
|
4550
4562
|
},
|
|
4551
4563
|
},
|
|
4564
|
+
replyCount: {
|
|
4565
|
+
type: 'integer',
|
|
4566
|
+
},
|
|
4567
|
+
repostCount: {
|
|
4568
|
+
type: 'integer',
|
|
4569
|
+
},
|
|
4570
|
+
likeCount: {
|
|
4571
|
+
type: 'integer',
|
|
4572
|
+
},
|
|
4552
4573
|
embeds: {
|
|
4553
4574
|
type: 'array',
|
|
4554
4575
|
items: {
|
|
@@ -4736,6 +4757,12 @@ export const schemaDict = {
|
|
|
4736
4757
|
type: 'union',
|
|
4737
4758
|
refs: ['lex:app.bsky.feed.defs#reasonRepost'],
|
|
4738
4759
|
},
|
|
4760
|
+
feedContext: {
|
|
4761
|
+
type: 'string',
|
|
4762
|
+
description:
|
|
4763
|
+
'Context provided by feed generator that may be passed back alongside interactions.',
|
|
4764
|
+
maxLength: 2000,
|
|
4765
|
+
},
|
|
4739
4766
|
},
|
|
4740
4767
|
},
|
|
4741
4768
|
replyRef: {
|
|
@@ -4886,11 +4913,15 @@ export const schemaDict = {
|
|
|
4886
4913
|
},
|
|
4887
4914
|
avatar: {
|
|
4888
4915
|
type: 'string',
|
|
4916
|
+
format: 'uri',
|
|
4889
4917
|
},
|
|
4890
4918
|
likeCount: {
|
|
4891
4919
|
type: 'integer',
|
|
4892
4920
|
minimum: 0,
|
|
4893
4921
|
},
|
|
4922
|
+
acceptsInteractions: {
|
|
4923
|
+
type: 'boolean',
|
|
4924
|
+
},
|
|
4894
4925
|
labels: {
|
|
4895
4926
|
type: 'array',
|
|
4896
4927
|
items: {
|
|
@@ -4929,6 +4960,12 @@ export const schemaDict = {
|
|
|
4929
4960
|
type: 'union',
|
|
4930
4961
|
refs: ['lex:app.bsky.feed.defs#skeletonReasonRepost'],
|
|
4931
4962
|
},
|
|
4963
|
+
feedContext: {
|
|
4964
|
+
type: 'string',
|
|
4965
|
+
description:
|
|
4966
|
+
'Context that will be passed through to client and may be passed to feed generator back alongside interactions.',
|
|
4967
|
+
maxLength: 2000,
|
|
4968
|
+
},
|
|
4932
4969
|
},
|
|
4933
4970
|
},
|
|
4934
4971
|
skeletonReasonRepost: {
|
|
@@ -4964,6 +5001,89 @@ export const schemaDict = {
|
|
|
4964
5001
|
},
|
|
4965
5002
|
},
|
|
4966
5003
|
},
|
|
5004
|
+
interaction: {
|
|
5005
|
+
type: 'object',
|
|
5006
|
+
properties: {
|
|
5007
|
+
item: {
|
|
5008
|
+
type: 'string',
|
|
5009
|
+
format: 'at-uri',
|
|
5010
|
+
},
|
|
5011
|
+
event: {
|
|
5012
|
+
type: 'string',
|
|
5013
|
+
knownValues: [
|
|
5014
|
+
'app.bsky.feed.defs#requestLess',
|
|
5015
|
+
'app.bsky.feed.defs#requestMore',
|
|
5016
|
+
'app.bsky.feed.defs#clickthroughItem',
|
|
5017
|
+
'app.bsky.feed.defs#clickthroughAuthor',
|
|
5018
|
+
'app.bsky.feed.defs#clickthroughReposter',
|
|
5019
|
+
'app.bsky.feed.defs#clickthroughEmbed',
|
|
5020
|
+
'app.bsky.feed.defs#interactionSeen',
|
|
5021
|
+
'app.bsky.feed.defs#interactionLike',
|
|
5022
|
+
'app.bsky.feed.defs#interactionRepost',
|
|
5023
|
+
'app.bsky.feed.defs#interactionReply',
|
|
5024
|
+
'app.bsky.feed.defs#interactionQuote',
|
|
5025
|
+
'app.bsky.feed.defs#interactionShare',
|
|
5026
|
+
],
|
|
5027
|
+
},
|
|
5028
|
+
feedContext: {
|
|
5029
|
+
type: 'string',
|
|
5030
|
+
description:
|
|
5031
|
+
'Context on a feed item that was orginally supplied by the feed generator on getFeedSkeleton.',
|
|
5032
|
+
maxLength: 2000,
|
|
5033
|
+
},
|
|
5034
|
+
},
|
|
5035
|
+
},
|
|
5036
|
+
requestLess: {
|
|
5037
|
+
type: 'token',
|
|
5038
|
+
description:
|
|
5039
|
+
'Request that less content like the given feed item be shown in the feed',
|
|
5040
|
+
},
|
|
5041
|
+
requestMore: {
|
|
5042
|
+
type: 'token',
|
|
5043
|
+
description:
|
|
5044
|
+
'Request that more content like the given feed item be shown in the feed',
|
|
5045
|
+
},
|
|
5046
|
+
clickthroughItem: {
|
|
5047
|
+
type: 'token',
|
|
5048
|
+
description: 'User clicked through to the feed item',
|
|
5049
|
+
},
|
|
5050
|
+
clickthroughAuthor: {
|
|
5051
|
+
type: 'token',
|
|
5052
|
+
description: 'User clicked through to the author of the feed item',
|
|
5053
|
+
},
|
|
5054
|
+
clickthroughReposter: {
|
|
5055
|
+
type: 'token',
|
|
5056
|
+
description: 'User clicked through to the reposter of the feed item',
|
|
5057
|
+
},
|
|
5058
|
+
clickthroughEmbed: {
|
|
5059
|
+
type: 'token',
|
|
5060
|
+
description:
|
|
5061
|
+
'User clicked through to the embedded content of the feed item',
|
|
5062
|
+
},
|
|
5063
|
+
interactionSeen: {
|
|
5064
|
+
type: 'token',
|
|
5065
|
+
description: 'Feed item was seen by user',
|
|
5066
|
+
},
|
|
5067
|
+
interactionLike: {
|
|
5068
|
+
type: 'token',
|
|
5069
|
+
description: 'User liked the feed item',
|
|
5070
|
+
},
|
|
5071
|
+
interactionRepost: {
|
|
5072
|
+
type: 'token',
|
|
5073
|
+
description: 'User reposted the feed item',
|
|
5074
|
+
},
|
|
5075
|
+
interactionReply: {
|
|
5076
|
+
type: 'token',
|
|
5077
|
+
description: 'User replied to the feed item',
|
|
5078
|
+
},
|
|
5079
|
+
interactionQuote: {
|
|
5080
|
+
type: 'token',
|
|
5081
|
+
description: 'User quoted the feed item',
|
|
5082
|
+
},
|
|
5083
|
+
interactionShare: {
|
|
5084
|
+
type: 'token',
|
|
5085
|
+
description: 'User shared the feed item',
|
|
5086
|
+
},
|
|
4967
5087
|
},
|
|
4968
5088
|
},
|
|
4969
5089
|
AppBskyFeedDescribeFeedGenerator: {
|
|
@@ -5061,6 +5181,11 @@ export const schemaDict = {
|
|
|
5061
5181
|
accept: ['image/png', 'image/jpeg'],
|
|
5062
5182
|
maxSize: 1000000,
|
|
5063
5183
|
},
|
|
5184
|
+
acceptsInteractions: {
|
|
5185
|
+
type: 'boolean',
|
|
5186
|
+
description:
|
|
5187
|
+
'Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions',
|
|
5188
|
+
},
|
|
5064
5189
|
labels: {
|
|
5065
5190
|
type: 'union',
|
|
5066
5191
|
description: 'Self-label values',
|
|
@@ -6042,6 +6167,61 @@ export const schemaDict = {
|
|
|
6042
6167
|
description:
|
|
6043
6168
|
'Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.',
|
|
6044
6169
|
},
|
|
6170
|
+
sort: {
|
|
6171
|
+
type: 'string',
|
|
6172
|
+
knownValues: ['top', 'latest'],
|
|
6173
|
+
default: 'latest',
|
|
6174
|
+
description: 'Specifies the ranking order of results.',
|
|
6175
|
+
},
|
|
6176
|
+
since: {
|
|
6177
|
+
type: 'string',
|
|
6178
|
+
description:
|
|
6179
|
+
"Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD).",
|
|
6180
|
+
},
|
|
6181
|
+
until: {
|
|
6182
|
+
type: 'string',
|
|
6183
|
+
description:
|
|
6184
|
+
"Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD).",
|
|
6185
|
+
},
|
|
6186
|
+
mentions: {
|
|
6187
|
+
type: 'string',
|
|
6188
|
+
format: 'at-identifier',
|
|
6189
|
+
description:
|
|
6190
|
+
'Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions.',
|
|
6191
|
+
},
|
|
6192
|
+
author: {
|
|
6193
|
+
type: 'string',
|
|
6194
|
+
format: 'at-identifier',
|
|
6195
|
+
description:
|
|
6196
|
+
'Filter to posts by the given account. Handles are resolved to DID before query-time.',
|
|
6197
|
+
},
|
|
6198
|
+
lang: {
|
|
6199
|
+
type: 'string',
|
|
6200
|
+
format: 'language',
|
|
6201
|
+
description:
|
|
6202
|
+
'Filter to posts in the given language. Expected to be based on post language field, though server may override language detection.',
|
|
6203
|
+
},
|
|
6204
|
+
domain: {
|
|
6205
|
+
type: 'string',
|
|
6206
|
+
description:
|
|
6207
|
+
'Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization.',
|
|
6208
|
+
},
|
|
6209
|
+
url: {
|
|
6210
|
+
type: 'string',
|
|
6211
|
+
format: 'uri',
|
|
6212
|
+
description:
|
|
6213
|
+
'Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching.',
|
|
6214
|
+
},
|
|
6215
|
+
tag: {
|
|
6216
|
+
type: 'array',
|
|
6217
|
+
items: {
|
|
6218
|
+
type: 'string',
|
|
6219
|
+
maxLength: 640,
|
|
6220
|
+
maxGraphemes: 64,
|
|
6221
|
+
},
|
|
6222
|
+
description:
|
|
6223
|
+
"Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching.",
|
|
6224
|
+
},
|
|
6045
6225
|
limit: {
|
|
6046
6226
|
type: 'integer',
|
|
6047
6227
|
minimum: 1,
|
|
@@ -6087,6 +6267,40 @@ export const schemaDict = {
|
|
|
6087
6267
|
},
|
|
6088
6268
|
},
|
|
6089
6269
|
},
|
|
6270
|
+
AppBskyFeedSendInteractions: {
|
|
6271
|
+
lexicon: 1,
|
|
6272
|
+
id: 'app.bsky.feed.sendInteractions',
|
|
6273
|
+
defs: {
|
|
6274
|
+
main: {
|
|
6275
|
+
type: 'procedure',
|
|
6276
|
+
description:
|
|
6277
|
+
'Send information about interactions with feed items back to the feed generator that served them.',
|
|
6278
|
+
input: {
|
|
6279
|
+
encoding: 'application/json',
|
|
6280
|
+
schema: {
|
|
6281
|
+
type: 'object',
|
|
6282
|
+
required: ['interactions'],
|
|
6283
|
+
properties: {
|
|
6284
|
+
interactions: {
|
|
6285
|
+
type: 'array',
|
|
6286
|
+
items: {
|
|
6287
|
+
type: 'ref',
|
|
6288
|
+
ref: 'lex:app.bsky.feed.defs#interaction',
|
|
6289
|
+
},
|
|
6290
|
+
},
|
|
6291
|
+
},
|
|
6292
|
+
},
|
|
6293
|
+
},
|
|
6294
|
+
output: {
|
|
6295
|
+
encoding: 'application/json',
|
|
6296
|
+
schema: {
|
|
6297
|
+
type: 'object',
|
|
6298
|
+
properties: {},
|
|
6299
|
+
},
|
|
6300
|
+
},
|
|
6301
|
+
},
|
|
6302
|
+
},
|
|
6303
|
+
},
|
|
6090
6304
|
AppBskyFeedThreadgate: {
|
|
6091
6305
|
lexicon: 1,
|
|
6092
6306
|
id: 'app.bsky.feed.threadgate',
|
|
@@ -6201,6 +6415,7 @@ export const schemaDict = {
|
|
|
6201
6415
|
},
|
|
6202
6416
|
avatar: {
|
|
6203
6417
|
type: 'string',
|
|
6418
|
+
format: 'uri',
|
|
6204
6419
|
},
|
|
6205
6420
|
labels: {
|
|
6206
6421
|
type: 'array',
|
|
@@ -6258,6 +6473,7 @@ export const schemaDict = {
|
|
|
6258
6473
|
},
|
|
6259
6474
|
avatar: {
|
|
6260
6475
|
type: 'string',
|
|
6476
|
+
format: 'uri',
|
|
6261
6477
|
},
|
|
6262
6478
|
labels: {
|
|
6263
6479
|
type: 'array',
|
|
@@ -7691,6 +7907,12 @@ export const schemaDict = {
|
|
|
7691
7907
|
description:
|
|
7692
7908
|
'Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax.',
|
|
7693
7909
|
},
|
|
7910
|
+
viewer: {
|
|
7911
|
+
type: 'string',
|
|
7912
|
+
format: 'did',
|
|
7913
|
+
description:
|
|
7914
|
+
'DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking.',
|
|
7915
|
+
},
|
|
7694
7916
|
typeahead: {
|
|
7695
7917
|
type: 'boolean',
|
|
7696
7918
|
description: "If true, acts as fast/simple 'typeahead' query.",
|
|
@@ -7756,6 +7978,67 @@ export const schemaDict = {
|
|
|
7756
7978
|
description:
|
|
7757
7979
|
'Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.',
|
|
7758
7980
|
},
|
|
7981
|
+
sort: {
|
|
7982
|
+
type: 'string',
|
|
7983
|
+
knownValues: ['top', 'latest'],
|
|
7984
|
+
default: 'latest',
|
|
7985
|
+
description: 'Specifies the ranking order of results.',
|
|
7986
|
+
},
|
|
7987
|
+
since: {
|
|
7988
|
+
type: 'string',
|
|
7989
|
+
description:
|
|
7990
|
+
"Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD).",
|
|
7991
|
+
},
|
|
7992
|
+
until: {
|
|
7993
|
+
type: 'string',
|
|
7994
|
+
description:
|
|
7995
|
+
"Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD).",
|
|
7996
|
+
},
|
|
7997
|
+
mentions: {
|
|
7998
|
+
type: 'string',
|
|
7999
|
+
format: 'at-identifier',
|
|
8000
|
+
description:
|
|
8001
|
+
'Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions.',
|
|
8002
|
+
},
|
|
8003
|
+
author: {
|
|
8004
|
+
type: 'string',
|
|
8005
|
+
format: 'at-identifier',
|
|
8006
|
+
description:
|
|
8007
|
+
'Filter to posts by the given account. Handles are resolved to DID before query-time.',
|
|
8008
|
+
},
|
|
8009
|
+
lang: {
|
|
8010
|
+
type: 'string',
|
|
8011
|
+
format: 'language',
|
|
8012
|
+
description:
|
|
8013
|
+
'Filter to posts in the given language. Expected to be based on post language field, though server may override language detection.',
|
|
8014
|
+
},
|
|
8015
|
+
domain: {
|
|
8016
|
+
type: 'string',
|
|
8017
|
+
description:
|
|
8018
|
+
'Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization.',
|
|
8019
|
+
},
|
|
8020
|
+
url: {
|
|
8021
|
+
type: 'string',
|
|
8022
|
+
format: 'uri',
|
|
8023
|
+
description:
|
|
8024
|
+
'Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching.',
|
|
8025
|
+
},
|
|
8026
|
+
tag: {
|
|
8027
|
+
type: 'array',
|
|
8028
|
+
items: {
|
|
8029
|
+
type: 'string',
|
|
8030
|
+
maxLength: 640,
|
|
8031
|
+
maxGraphemes: 64,
|
|
8032
|
+
},
|
|
8033
|
+
description:
|
|
8034
|
+
"Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching.",
|
|
8035
|
+
},
|
|
8036
|
+
viewer: {
|
|
8037
|
+
type: 'string',
|
|
8038
|
+
format: 'did',
|
|
8039
|
+
description:
|
|
8040
|
+
"DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries.",
|
|
8041
|
+
},
|
|
7759
8042
|
limit: {
|
|
7760
8043
|
type: 'integer',
|
|
7761
8044
|
minimum: 1,
|
|
@@ -7926,6 +8209,7 @@ export const ids = {
|
|
|
7926
8209
|
AppBskyFeedPost: 'app.bsky.feed.post',
|
|
7927
8210
|
AppBskyFeedRepost: 'app.bsky.feed.repost',
|
|
7928
8211
|
AppBskyFeedSearchPosts: 'app.bsky.feed.searchPosts',
|
|
8212
|
+
AppBskyFeedSendInteractions: 'app.bsky.feed.sendInteractions',
|
|
7929
8213
|
AppBskyFeedThreadgate: 'app.bsky.feed.threadgate',
|
|
7930
8214
|
AppBskyGraphBlock: 'app.bsky.graph.block',
|
|
7931
8215
|
AppBskyGraphDefs: 'app.bsky.graph.defs',
|
|
@@ -62,6 +62,9 @@ export interface ViewRecord {
|
|
|
62
62
|
/** The record data itself. */
|
|
63
63
|
value: {}
|
|
64
64
|
labels?: ComAtprotoLabelDefs.Label[]
|
|
65
|
+
replyCount?: number
|
|
66
|
+
repostCount?: number
|
|
67
|
+
likeCount?: number
|
|
65
68
|
embeds?: (
|
|
66
69
|
| AppBskyEmbedImages.View
|
|
67
70
|
| AppBskyEmbedExternal.View
|
|
@@ -69,6 +69,8 @@ export interface FeedViewPost {
|
|
|
69
69
|
post: PostView
|
|
70
70
|
reply?: ReplyRef
|
|
71
71
|
reason?: ReasonRepost | { $type: string; [k: string]: unknown }
|
|
72
|
+
/** Context provided by feed generator that may be passed back alongside interactions. */
|
|
73
|
+
feedContext?: string
|
|
72
74
|
[k: string]: unknown
|
|
73
75
|
}
|
|
74
76
|
|
|
@@ -219,6 +221,7 @@ export interface GeneratorView {
|
|
|
219
221
|
descriptionFacets?: AppBskyRichtextFacet.Main[]
|
|
220
222
|
avatar?: string
|
|
221
223
|
likeCount?: number
|
|
224
|
+
acceptsInteractions?: boolean
|
|
222
225
|
labels?: ComAtprotoLabelDefs.Label[]
|
|
223
226
|
viewer?: GeneratorViewerState
|
|
224
227
|
indexedAt: string
|
|
@@ -257,6 +260,8 @@ export function validateGeneratorViewerState(v: unknown): ValidationResult {
|
|
|
257
260
|
export interface SkeletonFeedPost {
|
|
258
261
|
post: string
|
|
259
262
|
reason?: SkeletonReasonRepost | { $type: string; [k: string]: unknown }
|
|
263
|
+
/** Context that will be passed through to client and may be passed to feed generator back alongside interactions. */
|
|
264
|
+
feedContext?: string
|
|
260
265
|
[k: string]: unknown
|
|
261
266
|
}
|
|
262
267
|
|
|
@@ -308,3 +313,61 @@ export function isThreadgateView(v: unknown): v is ThreadgateView {
|
|
|
308
313
|
export function validateThreadgateView(v: unknown): ValidationResult {
|
|
309
314
|
return lexicons.validate('app.bsky.feed.defs#threadgateView', v)
|
|
310
315
|
}
|
|
316
|
+
|
|
317
|
+
export interface Interaction {
|
|
318
|
+
item?: string
|
|
319
|
+
event?:
|
|
320
|
+
| 'app.bsky.feed.defs#requestLess'
|
|
321
|
+
| 'app.bsky.feed.defs#requestMore'
|
|
322
|
+
| 'app.bsky.feed.defs#clickthroughItem'
|
|
323
|
+
| 'app.bsky.feed.defs#clickthroughAuthor'
|
|
324
|
+
| 'app.bsky.feed.defs#clickthroughReposter'
|
|
325
|
+
| 'app.bsky.feed.defs#clickthroughEmbed'
|
|
326
|
+
| 'app.bsky.feed.defs#interactionSeen'
|
|
327
|
+
| 'app.bsky.feed.defs#interactionLike'
|
|
328
|
+
| 'app.bsky.feed.defs#interactionRepost'
|
|
329
|
+
| 'app.bsky.feed.defs#interactionReply'
|
|
330
|
+
| 'app.bsky.feed.defs#interactionQuote'
|
|
331
|
+
| 'app.bsky.feed.defs#interactionShare'
|
|
332
|
+
| (string & {})
|
|
333
|
+
/** Context on a feed item that was orginally supplied by the feed generator on getFeedSkeleton. */
|
|
334
|
+
feedContext?: string
|
|
335
|
+
[k: string]: unknown
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export function isInteraction(v: unknown): v is Interaction {
|
|
339
|
+
return (
|
|
340
|
+
isObj(v) &&
|
|
341
|
+
hasProp(v, '$type') &&
|
|
342
|
+
v.$type === 'app.bsky.feed.defs#interaction'
|
|
343
|
+
)
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export function validateInteraction(v: unknown): ValidationResult {
|
|
347
|
+
return lexicons.validate('app.bsky.feed.defs#interaction', v)
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/** Request that less content like the given feed item be shown in the feed */
|
|
351
|
+
export const REQUESTLESS = 'app.bsky.feed.defs#requestLess'
|
|
352
|
+
/** Request that more content like the given feed item be shown in the feed */
|
|
353
|
+
export const REQUESTMORE = 'app.bsky.feed.defs#requestMore'
|
|
354
|
+
/** User clicked through to the feed item */
|
|
355
|
+
export const CLICKTHROUGHITEM = 'app.bsky.feed.defs#clickthroughItem'
|
|
356
|
+
/** User clicked through to the author of the feed item */
|
|
357
|
+
export const CLICKTHROUGHAUTHOR = 'app.bsky.feed.defs#clickthroughAuthor'
|
|
358
|
+
/** User clicked through to the reposter of the feed item */
|
|
359
|
+
export const CLICKTHROUGHREPOSTER = 'app.bsky.feed.defs#clickthroughReposter'
|
|
360
|
+
/** User clicked through to the embedded content of the feed item */
|
|
361
|
+
export const CLICKTHROUGHEMBED = 'app.bsky.feed.defs#clickthroughEmbed'
|
|
362
|
+
/** Feed item was seen by user */
|
|
363
|
+
export const INTERACTIONSEEN = 'app.bsky.feed.defs#interactionSeen'
|
|
364
|
+
/** User liked the feed item */
|
|
365
|
+
export const INTERACTIONLIKE = 'app.bsky.feed.defs#interactionLike'
|
|
366
|
+
/** User reposted the feed item */
|
|
367
|
+
export const INTERACTIONREPOST = 'app.bsky.feed.defs#interactionRepost'
|
|
368
|
+
/** User replied to the feed item */
|
|
369
|
+
export const INTERACTIONREPLY = 'app.bsky.feed.defs#interactionReply'
|
|
370
|
+
/** User quoted the feed item */
|
|
371
|
+
export const INTERACTIONQUOTE = 'app.bsky.feed.defs#interactionQuote'
|
|
372
|
+
/** User shared the feed item */
|
|
373
|
+
export const INTERACTIONSHARE = 'app.bsky.feed.defs#interactionShare'
|
|
@@ -14,6 +14,8 @@ export interface Record {
|
|
|
14
14
|
description?: string
|
|
15
15
|
descriptionFacets?: AppBskyRichtextFacet.Main[]
|
|
16
16
|
avatar?: BlobRef
|
|
17
|
+
/** Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions */
|
|
18
|
+
acceptsInteractions?: boolean
|
|
17
19
|
labels?:
|
|
18
20
|
| ComAtprotoLabelDefs.SelfLabels
|
|
19
21
|
| { $type: string; [k: string]: unknown }
|
|
@@ -12,6 +12,24 @@ import * as AppBskyFeedDefs from './defs'
|
|
|
12
12
|
export interface QueryParams {
|
|
13
13
|
/** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */
|
|
14
14
|
q: string
|
|
15
|
+
/** Specifies the ranking order of results. */
|
|
16
|
+
sort: 'top' | 'latest' | (string & {})
|
|
17
|
+
/** Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). */
|
|
18
|
+
since?: string
|
|
19
|
+
/** Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). */
|
|
20
|
+
until?: string
|
|
21
|
+
/** Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. */
|
|
22
|
+
mentions?: string
|
|
23
|
+
/** Filter to posts by the given account. Handles are resolved to DID before query-time. */
|
|
24
|
+
author?: string
|
|
25
|
+
/** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. */
|
|
26
|
+
lang?: string
|
|
27
|
+
/** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. */
|
|
28
|
+
domain?: string
|
|
29
|
+
/** Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. */
|
|
30
|
+
url?: string
|
|
31
|
+
/** Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. */
|
|
32
|
+
tag?: string[]
|
|
15
33
|
limit: number
|
|
16
34
|
/** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */
|
|
17
35
|
cursor?: string
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppBskyFeedDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {}
|
|
13
|
+
|
|
14
|
+
export interface InputSchema {
|
|
15
|
+
interactions: AppBskyFeedDefs.Interaction[]
|
|
16
|
+
[k: string]: unknown
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface OutputSchema {
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface HandlerInput {
|
|
24
|
+
encoding: 'application/json'
|
|
25
|
+
body: InputSchema
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface HandlerSuccess {
|
|
29
|
+
encoding: 'application/json'
|
|
30
|
+
body: OutputSchema
|
|
31
|
+
headers?: { [key: string]: string }
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface HandlerError {
|
|
35
|
+
status: number
|
|
36
|
+
message?: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
40
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
41
|
+
auth: HA
|
|
42
|
+
params: QueryParams
|
|
43
|
+
input: HandlerInput
|
|
44
|
+
req: express.Request
|
|
45
|
+
res: express.Response
|
|
46
|
+
}
|
|
47
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
48
|
+
ctx: HandlerReqCtx<HA>,
|
|
49
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -12,6 +12,8 @@ import * as AppBskyUnspeccedDefs from './defs'
|
|
|
12
12
|
export interface QueryParams {
|
|
13
13
|
/** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax. */
|
|
14
14
|
q: string
|
|
15
|
+
/** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. */
|
|
16
|
+
viewer?: string
|
|
15
17
|
/** If true, acts as fast/simple 'typeahead' query. */
|
|
16
18
|
typeahead?: boolean
|
|
17
19
|
limit: number
|
|
@@ -12,6 +12,26 @@ import * as AppBskyUnspeccedDefs from './defs'
|
|
|
12
12
|
export interface QueryParams {
|
|
13
13
|
/** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */
|
|
14
14
|
q: string
|
|
15
|
+
/** Specifies the ranking order of results. */
|
|
16
|
+
sort: 'top' | 'latest' | (string & {})
|
|
17
|
+
/** Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). */
|
|
18
|
+
since?: string
|
|
19
|
+
/** Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). */
|
|
20
|
+
until?: string
|
|
21
|
+
/** Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. */
|
|
22
|
+
mentions?: string
|
|
23
|
+
/** Filter to posts by the given account. Handles are resolved to DID before query-time. */
|
|
24
|
+
author?: string
|
|
25
|
+
/** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. */
|
|
26
|
+
lang?: string
|
|
27
|
+
/** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. */
|
|
28
|
+
domain?: string
|
|
29
|
+
/** Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. */
|
|
30
|
+
url?: string
|
|
31
|
+
/** Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. */
|
|
32
|
+
tag?: string[]
|
|
33
|
+
/** DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries. */
|
|
34
|
+
viewer?: string
|
|
15
35
|
limit: number
|
|
16
36
|
/** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */
|
|
17
37
|
cursor?: string
|