@atproto/pds 0.4.141 → 0.4.143

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.
@@ -11,7 +11,7 @@ import {
11
11
  type OmitKey,
12
12
  } from '../../../../util'
13
13
  import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
14
- import type * as AppBskyFeedDefs from '../feed/defs.js'
14
+ import type * as AppBskyUnspeccedDefs from './defs.js'
15
15
 
16
16
  const is$typed = _is$typed,
17
17
  validate = _validate
@@ -27,7 +27,7 @@ export interface QueryParams {
27
27
  export type InputSchema = undefined
28
28
 
29
29
  export interface OutputSchema {
30
- /** A flat list of thread hidden items. The depth of each item is indicated by the depth property inside the item. */
30
+ /** A flat list of hidden thread items. The depth of each item is indicated by the depth property inside the item. */
31
31
  thread: ThreadHiddenItem[]
32
32
  }
33
33
 
@@ -62,7 +62,7 @@ export interface ThreadHiddenItem {
62
62
  uri: string
63
63
  /** The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. */
64
64
  depth: number
65
- value: $Typed<ThreadHiddenItemPost> | { $type: string }
65
+ value: $Typed<AppBskyUnspeccedDefs.ThreadItemPost> | { $type: string }
66
66
  }
67
67
 
68
68
  const hashThreadHiddenItem = 'threadHiddenItem'
@@ -74,22 +74,3 @@ export function isThreadHiddenItem<V>(v: V) {
74
74
  export function validateThreadHiddenItem<V>(v: V) {
75
75
  return validate<ThreadHiddenItem & V>(v, id, hashThreadHiddenItem)
76
76
  }
77
-
78
- export interface ThreadHiddenItemPost {
79
- $type?: 'app.bsky.unspecced.getPostThreadHiddenV2#threadHiddenItemPost'
80
- post: AppBskyFeedDefs.PostView
81
- /** The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread. */
82
- hiddenByThreadgate: boolean
83
- /** This is by an account muted by the viewer requesting it. */
84
- mutedByViewer: boolean
85
- }
86
-
87
- const hashThreadHiddenItemPost = 'threadHiddenItemPost'
88
-
89
- export function isThreadHiddenItemPost<V>(v: V) {
90
- return is$typed(v, id, hashThreadHiddenItemPost)
91
- }
92
-
93
- export function validateThreadHiddenItemPost<V>(v: V) {
94
- return validate<ThreadHiddenItemPost & V>(v, id, hashThreadHiddenItemPost)
95
- }
@@ -12,6 +12,7 @@ import {
12
12
  } from '../../../../util'
13
13
  import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
14
14
  import type * as AppBskyFeedDefs from '../feed/defs.js'
15
+ import type * as AppBskyUnspeccedDefs from './defs.js'
15
16
 
16
17
  const is$typed = _is$typed,
17
18
  validate = _validate
@@ -74,10 +75,10 @@ export interface ThreadItem {
74
75
  /** The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. */
75
76
  depth: number
76
77
  value:
77
- | $Typed<ThreadItemPost>
78
- | $Typed<ThreadItemNoUnauthenticated>
79
- | $Typed<ThreadItemNotFound>
80
- | $Typed<ThreadItemBlocked>
78
+ | $Typed<AppBskyUnspeccedDefs.ThreadItemPost>
79
+ | $Typed<AppBskyUnspeccedDefs.ThreadItemNoUnauthenticated>
80
+ | $Typed<AppBskyUnspeccedDefs.ThreadItemNotFound>
81
+ | $Typed<AppBskyUnspeccedDefs.ThreadItemBlocked>
81
82
  | { $type: string }
82
83
  }
83
84
 
@@ -90,71 +91,3 @@ export function isThreadItem<V>(v: V) {
90
91
  export function validateThreadItem<V>(v: V) {
91
92
  return validate<ThreadItem & V>(v, id, hashThreadItem)
92
93
  }
93
-
94
- export interface ThreadItemPost {
95
- $type?: 'app.bsky.unspecced.getPostThreadV2#threadItemPost'
96
- post: AppBskyFeedDefs.PostView
97
- /** This post has more parents that were not present in the response. This is just a boolean, without the number of parents. */
98
- moreParents: boolean
99
- /** This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate. */
100
- moreReplies: number
101
- /** This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread. */
102
- opThread: boolean
103
- }
104
-
105
- const hashThreadItemPost = 'threadItemPost'
106
-
107
- export function isThreadItemPost<V>(v: V) {
108
- return is$typed(v, id, hashThreadItemPost)
109
- }
110
-
111
- export function validateThreadItemPost<V>(v: V) {
112
- return validate<ThreadItemPost & V>(v, id, hashThreadItemPost)
113
- }
114
-
115
- export interface ThreadItemNoUnauthenticated {
116
- $type?: 'app.bsky.unspecced.getPostThreadV2#threadItemNoUnauthenticated'
117
- }
118
-
119
- const hashThreadItemNoUnauthenticated = 'threadItemNoUnauthenticated'
120
-
121
- export function isThreadItemNoUnauthenticated<V>(v: V) {
122
- return is$typed(v, id, hashThreadItemNoUnauthenticated)
123
- }
124
-
125
- export function validateThreadItemNoUnauthenticated<V>(v: V) {
126
- return validate<ThreadItemNoUnauthenticated & V>(
127
- v,
128
- id,
129
- hashThreadItemNoUnauthenticated,
130
- )
131
- }
132
-
133
- export interface ThreadItemNotFound {
134
- $type?: 'app.bsky.unspecced.getPostThreadV2#threadItemNotFound'
135
- }
136
-
137
- const hashThreadItemNotFound = 'threadItemNotFound'
138
-
139
- export function isThreadItemNotFound<V>(v: V) {
140
- return is$typed(v, id, hashThreadItemNotFound)
141
- }
142
-
143
- export function validateThreadItemNotFound<V>(v: V) {
144
- return validate<ThreadItemNotFound & V>(v, id, hashThreadItemNotFound)
145
- }
146
-
147
- export interface ThreadItemBlocked {
148
- $type?: 'app.bsky.unspecced.getPostThreadV2#threadItemBlocked'
149
- author: AppBskyFeedDefs.BlockedAuthor
150
- }
151
-
152
- const hashThreadItemBlocked = 'threadItemBlocked'
153
-
154
- export function isThreadItemBlocked<V>(v: V) {
155
- return is$typed(v, id, hashThreadItemBlocked)
156
- }
157
-
158
- export function validateThreadItemBlocked<V>(v: V) {
159
- return validate<ThreadItemBlocked & V>(v, id, hashThreadItemBlocked)
160
- }