@atproto/pds 0.4.51 → 0.4.53

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/lexicon/index.d.ts +2 -0
  3. package/dist/lexicon/index.d.ts.map +1 -1
  4. package/dist/lexicon/index.js +4 -0
  5. package/dist/lexicon/index.js.map +1 -1
  6. package/dist/lexicon/lexicons.d.ts +144 -0
  7. package/dist/lexicon/lexicons.d.ts.map +1 -1
  8. package/dist/lexicon/lexicons.js +146 -1
  9. package/dist/lexicon/lexicons.js.map +1 -1
  10. package/dist/lexicon/types/app/bsky/embed/record.d.ts +9 -1
  11. package/dist/lexicon/types/app/bsky/embed/record.d.ts.map +1 -1
  12. package/dist/lexicon/types/app/bsky/embed/record.js +11 -1
  13. package/dist/lexicon/types/app/bsky/embed/record.js.map +1 -1
  14. package/dist/lexicon/types/app/bsky/feed/defs.d.ts +2 -0
  15. package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
  16. package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
  17. package/dist/lexicon/types/app/bsky/feed/getQuotes.d.ts +44 -0
  18. package/dist/lexicon/types/app/bsky/feed/getQuotes.d.ts.map +1 -0
  19. package/dist/lexicon/types/app/bsky/feed/getQuotes.js +3 -0
  20. package/dist/lexicon/types/app/bsky/feed/getQuotes.js.map +1 -0
  21. package/dist/lexicon/types/app/bsky/feed/postgate.d.ts +25 -0
  22. package/dist/lexicon/types/app/bsky/feed/postgate.d.ts.map +1 -0
  23. package/dist/lexicon/types/app/bsky/feed/postgate.js +27 -0
  24. package/dist/lexicon/types/app/bsky/feed/postgate.js.map +1 -0
  25. package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts +2 -0
  26. package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts.map +1 -1
  27. package/dist/lexicon/types/app/bsky/feed/threadgate.js.map +1 -1
  28. package/package.json +4 -4
  29. package/src/lexicon/index.ts +12 -0
  30. package/src/lexicon/lexicons.ts +149 -1
  31. package/src/lexicon/types/app/bsky/embed/record.ts +20 -0
  32. package/src/lexicon/types/app/bsky/feed/defs.ts +2 -0
  33. package/src/lexicon/types/app/bsky/feed/getQuotes.ts +54 -0
  34. package/src/lexicon/types/app/bsky/feed/postgate.ts +47 -0
  35. package/src/lexicon/types/app/bsky/feed/threadgate.ts +2 -0
  36. package/tests/proxied/__snapshots__/feedgen.test.ts.snap +5 -0
  37. package/tests/proxied/__snapshots__/views.test.ts.snap +90 -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
+ }
@@ -16,6 +16,8 @@ export interface Record {
16
16
  | { $type: string; [k: string]: unknown }
17
17
  )[]
18
18
  createdAt: string
19
+ /** List of hidden reply URIs. */
20
+ hiddenReplies?: string[]
19
21
  [k: string]: unknown
20
22
  }
21
23
 
@@ -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
  },
@@ -118,6 +120,7 @@ Object {
118
120
  "indexedAt": "1970-01-01T00:00:00.000Z",
119
121
  "labels": Array [],
120
122
  "likeCount": 0,
123
+ "quoteCount": 1,
121
124
  "replyCount": 0,
122
125
  "repostCount": 0,
123
126
  "uri": "record(5)",
@@ -136,6 +139,7 @@ Object {
136
139
  "indexedAt": "1970-01-01T00:00:00.000Z",
137
140
  "labels": Array [],
138
141
  "likeCount": 2,
142
+ "quoteCount": 1,
139
143
  "record": Object {
140
144
  "$type": "app.bsky.feed.post",
141
145
  "createdAt": "1970-01-01T00:00:00.000Z",
@@ -181,6 +185,7 @@ Object {
181
185
  "repostCount": 0,
182
186
  "uri": "record(2)",
183
187
  "viewer": Object {
188
+ "embeddingDisabled": false,
184
189
  "like": "record(8)",
185
190
  "threadMuted": false,
186
191
  },