@atproto/pds 0.4.50 → 0.4.52
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +18 -0
- package/dist/api/com/atproto/server/activateAccount.js +1 -1
- package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/deleteSession.js +1 -1
- package/dist/api/com/atproto/server/deleteSession.js.map +1 -1
- package/dist/lexicon/index.d.ts +2 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +4 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +141 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +142 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/record.d.ts +8 -1
- package/dist/lexicon/types/app/bsky/embed/record.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/record.js +11 -1
- package/dist/lexicon/types/app/bsky/embed/record.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +2 -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/feed/getQuotes.d.ts +44 -0
- package/dist/lexicon/types/app/bsky/feed/getQuotes.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/feed/getQuotes.js +3 -0
- package/dist/lexicon/types/app/bsky/feed/getQuotes.js.map +1 -0
- package/dist/lexicon/types/app/bsky/feed/postgate.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/feed/postgate.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/feed/postgate.js +27 -0
- package/dist/lexicon/types/app/bsky/feed/postgate.js.map +1 -0
- package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/threadgate.js.map +1 -1
- package/package.json +5 -5
- package/src/api/com/atproto/server/activateAccount.ts +1 -1
- package/src/api/com/atproto/server/deleteSession.ts +1 -1
- package/src/lexicon/index.ts +12 -0
- package/src/lexicon/lexicons.ts +145 -0
- package/src/lexicon/types/app/bsky/embed/record.ts +19 -0
- package/src/lexicon/types/app/bsky/feed/defs.ts +2 -0
- package/src/lexicon/types/app/bsky/feed/getQuotes.ts +54 -0
- package/src/lexicon/types/app/bsky/feed/postgate.ts +47 -0
- package/src/lexicon/types/app/bsky/feed/threadgate.ts +2 -0
- package/tests/proxied/__snapshots__/feedgen.test.ts.snap +4 -0
- package/tests/proxied/__snapshots__/views.test.ts.snap +80 -0
@@ -0,0 +1,54 @@
|
|
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
|
+
/** Reference (AT-URI) of post record */
|
14
|
+
uri: string
|
15
|
+
/** If supplied, filters to quotes of specific version (by CID) of the post record. */
|
16
|
+
cid?: string
|
17
|
+
limit: number
|
18
|
+
cursor?: string
|
19
|
+
}
|
20
|
+
|
21
|
+
export type InputSchema = undefined
|
22
|
+
|
23
|
+
export interface OutputSchema {
|
24
|
+
uri: string
|
25
|
+
cid?: string
|
26
|
+
cursor?: string
|
27
|
+
posts: AppBskyFeedDefs.PostView[]
|
28
|
+
[k: string]: unknown
|
29
|
+
}
|
30
|
+
|
31
|
+
export type HandlerInput = undefined
|
32
|
+
|
33
|
+
export interface HandlerSuccess {
|
34
|
+
encoding: 'application/json'
|
35
|
+
body: OutputSchema
|
36
|
+
headers?: { [key: string]: string }
|
37
|
+
}
|
38
|
+
|
39
|
+
export interface HandlerError {
|
40
|
+
status: number
|
41
|
+
message?: string
|
42
|
+
}
|
43
|
+
|
44
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
45
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
46
|
+
auth: HA
|
47
|
+
params: QueryParams
|
48
|
+
input: HandlerInput
|
49
|
+
req: express.Request
|
50
|
+
res: express.Response
|
51
|
+
}
|
52
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
53
|
+
ctx: HandlerReqCtx<HA>,
|
54
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/**
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
3
|
+
*/
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
5
|
+
import { lexicons } from '../../../../lexicons'
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
7
|
+
import { CID } from 'multiformats/cid'
|
8
|
+
|
9
|
+
export interface Record {
|
10
|
+
createdAt: string
|
11
|
+
/** Reference (AT-URI) to the post record. */
|
12
|
+
post: string
|
13
|
+
/** List of AT-URIs embedding this post that the author has detached from. */
|
14
|
+
detachedEmbeddingUris?: string[]
|
15
|
+
embeddingRules?: (DisableRule | { $type: string; [k: string]: unknown })[]
|
16
|
+
[k: string]: unknown
|
17
|
+
}
|
18
|
+
|
19
|
+
export function isRecord(v: unknown): v is Record {
|
20
|
+
return (
|
21
|
+
isObj(v) &&
|
22
|
+
hasProp(v, '$type') &&
|
23
|
+
(v.$type === 'app.bsky.feed.postgate#main' ||
|
24
|
+
v.$type === 'app.bsky.feed.postgate')
|
25
|
+
)
|
26
|
+
}
|
27
|
+
|
28
|
+
export function validateRecord(v: unknown): ValidationResult {
|
29
|
+
return lexicons.validate('app.bsky.feed.postgate#main', v)
|
30
|
+
}
|
31
|
+
|
32
|
+
/** Disables embedding of this post. */
|
33
|
+
export interface DisableRule {
|
34
|
+
[k: string]: unknown
|
35
|
+
}
|
36
|
+
|
37
|
+
export function isDisableRule(v: unknown): v is DisableRule {
|
38
|
+
return (
|
39
|
+
isObj(v) &&
|
40
|
+
hasProp(v, '$type') &&
|
41
|
+
v.$type === 'app.bsky.feed.postgate#disableRule'
|
42
|
+
)
|
43
|
+
}
|
44
|
+
|
45
|
+
export function validateDisableRule(v: unknown): ValidationResult {
|
46
|
+
return lexicons.validate('app.bsky.feed.postgate#disableRule', v)
|
47
|
+
}
|
@@ -44,6 +44,7 @@ Object {
|
|
44
44
|
},
|
45
45
|
],
|
46
46
|
"likeCount": 0,
|
47
|
+
"quoteCount": 0,
|
47
48
|
"record": Object {
|
48
49
|
"$type": "app.bsky.feed.post",
|
49
50
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
@@ -61,6 +62,7 @@ Object {
|
|
61
62
|
"repostCount": 0,
|
62
63
|
"uri": "record(0)",
|
63
64
|
"viewer": Object {
|
65
|
+
"embeddingDisabled": false,
|
64
66
|
"threadMuted": false,
|
65
67
|
},
|
66
68
|
},
|
@@ -136,6 +138,7 @@ Object {
|
|
136
138
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
137
139
|
"labels": Array [],
|
138
140
|
"likeCount": 2,
|
141
|
+
"quoteCount": 1,
|
139
142
|
"record": Object {
|
140
143
|
"$type": "app.bsky.feed.post",
|
141
144
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
@@ -181,6 +184,7 @@ Object {
|
|
181
184
|
"repostCount": 0,
|
182
185
|
"uri": "record(2)",
|
183
186
|
"viewer": Object {
|
187
|
+
"embeddingDisabled": false,
|
184
188
|
"like": "record(8)",
|
185
189
|
"threadMuted": false,
|
186
190
|
},
|