@atproto/pds 0.4.174 → 0.4.176

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/context.d.ts.map +1 -1
  3. package/dist/context.js +2 -1
  4. package/dist/context.js.map +1 -1
  5. package/dist/lexicon/index.d.ts +11 -0
  6. package/dist/lexicon/index.d.ts.map +1 -1
  7. package/dist/lexicon/index.js +32 -1
  8. package/dist/lexicon/index.js.map +1 -1
  9. package/dist/lexicon/lexicons.d.ts +288 -0
  10. package/dist/lexicon/lexicons.d.ts.map +1 -1
  11. package/dist/lexicon/lexicons.js +156 -0
  12. package/dist/lexicon/lexicons.js.map +1 -1
  13. package/dist/lexicon/types/app/bsky/bookmark/createBookmark.d.ts +16 -0
  14. package/dist/lexicon/types/app/bsky/bookmark/createBookmark.d.ts.map +1 -0
  15. package/dist/lexicon/types/app/bsky/bookmark/createBookmark.js +7 -0
  16. package/dist/lexicon/types/app/bsky/bookmark/createBookmark.js.map +1 -0
  17. package/dist/lexicon/types/app/bsky/bookmark/defs.d.ts +25 -0
  18. package/dist/lexicon/types/app/bsky/bookmark/defs.d.ts.map +1 -0
  19. package/dist/lexicon/types/app/bsky/bookmark/defs.js +25 -0
  20. package/dist/lexicon/types/app/bsky/bookmark/defs.js.map +1 -0
  21. package/dist/lexicon/types/app/bsky/bookmark/deleteBookmark.d.ts +15 -0
  22. package/dist/lexicon/types/app/bsky/bookmark/deleteBookmark.d.ts.map +1 -0
  23. package/dist/lexicon/types/app/bsky/bookmark/deleteBookmark.js +7 -0
  24. package/dist/lexicon/types/app/bsky/bookmark/deleteBookmark.js.map +1 -0
  25. package/dist/lexicon/types/app/bsky/bookmark/getBookmarks.d.ts +24 -0
  26. package/dist/lexicon/types/app/bsky/bookmark/getBookmarks.d.ts.map +1 -0
  27. package/dist/lexicon/types/app/bsky/bookmark/getBookmarks.js +7 -0
  28. package/dist/lexicon/types/app/bsky/bookmark/getBookmarks.js.map +1 -0
  29. package/dist/lexicon/types/app/bsky/feed/defs.d.ts +2 -0
  30. package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
  31. package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
  32. package/package.json +5 -5
  33. package/src/context.ts +2 -1
  34. package/src/lexicon/index.ts +49 -0
  35. package/src/lexicon/lexicons.ts +162 -0
  36. package/src/lexicon/types/app/bsky/bookmark/createBookmark.ts +35 -0
  37. package/src/lexicon/types/app/bsky/bookmark/defs.ts +54 -0
  38. package/src/lexicon/types/app/bsky/bookmark/deleteBookmark.ts +34 -0
  39. package/src/lexicon/types/app/bsky/bookmark/getBookmarks.ts +42 -0
  40. package/src/lexicon/types/app/bsky/feed/defs.ts +2 -0
  41. package/tests/proxied/__snapshots__/feedgen.test.ts.snap +4 -0
  42. package/tests/proxied/__snapshots__/views.test.ts.snap +80 -0
  43. package/tsconfig.build.tsbuildinfo +1 -1
@@ -0,0 +1,54 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
13
+ import type * as AppBskyFeedDefs from '../feed/defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'app.bsky.bookmark.defs'
18
+
19
+ /** Object used to store bookmark data in stash. */
20
+ export interface Bookmark {
21
+ $type?: 'app.bsky.bookmark.defs#bookmark'
22
+ subject: ComAtprotoRepoStrongRef.Main
23
+ }
24
+
25
+ const hashBookmark = 'bookmark'
26
+
27
+ export function isBookmark<V>(v: V) {
28
+ return is$typed(v, id, hashBookmark)
29
+ }
30
+
31
+ export function validateBookmark<V>(v: V) {
32
+ return validate<Bookmark & V>(v, id, hashBookmark)
33
+ }
34
+
35
+ export interface BookmarkView {
36
+ $type?: 'app.bsky.bookmark.defs#bookmarkView'
37
+ subject: ComAtprotoRepoStrongRef.Main
38
+ createdAt?: string
39
+ item:
40
+ | $Typed<AppBskyFeedDefs.BlockedPost>
41
+ | $Typed<AppBskyFeedDefs.NotFoundPost>
42
+ | $Typed<AppBskyFeedDefs.PostView>
43
+ | { $type: string }
44
+ }
45
+
46
+ const hashBookmarkView = 'bookmarkView'
47
+
48
+ export function isBookmarkView<V>(v: V) {
49
+ return is$typed(v, id, hashBookmarkView)
50
+ }
51
+
52
+ export function validateBookmarkView<V>(v: V) {
53
+ return validate<BookmarkView & V>(v, id, hashBookmarkView)
54
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+
13
+ const is$typed = _is$typed,
14
+ validate = _validate
15
+ const id = 'app.bsky.bookmark.deleteBookmark'
16
+
17
+ export type QueryParams = {}
18
+
19
+ export interface InputSchema {
20
+ uri: string
21
+ }
22
+
23
+ export interface HandlerInput {
24
+ encoding: 'application/json'
25
+ body: InputSchema
26
+ }
27
+
28
+ export interface HandlerError {
29
+ status: number
30
+ message?: string
31
+ error?: 'UnsupportedCollection'
32
+ }
33
+
34
+ export type HandlerOutput = HandlerError | void
@@ -0,0 +1,42 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as AppBskyBookmarkDefs from './defs.js'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'app.bsky.bookmark.getBookmarks'
17
+
18
+ export type QueryParams = {
19
+ limit: number
20
+ cursor?: string
21
+ }
22
+ export type InputSchema = undefined
23
+
24
+ export interface OutputSchema {
25
+ cursor?: string
26
+ bookmarks: AppBskyBookmarkDefs.BookmarkView[]
27
+ }
28
+
29
+ export type HandlerInput = void
30
+
31
+ export interface HandlerSuccess {
32
+ encoding: 'application/json'
33
+ body: OutputSchema
34
+ headers?: { [key: string]: string }
35
+ }
36
+
37
+ export interface HandlerError {
38
+ status: number
39
+ message?: string
40
+ }
41
+
42
+ export type HandlerOutput = HandlerError | HandlerSuccess
@@ -36,6 +36,7 @@ export interface PostView {
36
36
  | $Typed<AppBskyEmbedRecord.View>
37
37
  | $Typed<AppBskyEmbedRecordWithMedia.View>
38
38
  | { $type: string }
39
+ bookmarkCount?: number
39
40
  replyCount?: number
40
41
  repostCount?: number
41
42
  likeCount?: number
@@ -61,6 +62,7 @@ export interface ViewerState {
61
62
  $type?: 'app.bsky.feed.defs#viewerState'
62
63
  repost?: string
63
64
  like?: string
65
+ bookmarked?: boolean
64
66
  threadMuted?: boolean
65
67
  replyDisabled?: boolean
66
68
  embeddingDisabled?: boolean
@@ -37,6 +37,7 @@ Object {
37
37
  "muted": false,
38
38
  },
39
39
  },
40
+ "bookmarkCount": 0,
40
41
  "cid": "cids(0)",
41
42
  "indexedAt": "1970-01-01T00:00:00.000Z",
42
43
  "labels": Array [
@@ -67,6 +68,7 @@ Object {
67
68
  "repostCount": 0,
68
69
  "uri": "record(0)",
69
70
  "viewer": Object {
71
+ "bookmarked": false,
70
72
  "embeddingDisabled": false,
71
73
  "threadMuted": false,
72
74
  },
@@ -90,6 +92,7 @@ Object {
90
92
  "muted": false,
91
93
  },
92
94
  },
95
+ "bookmarkCount": 0,
93
96
  "cid": "cids(3)",
94
97
  "embed": Object {
95
98
  "$type": "app.bsky.embed.recordWithMedia#view",
@@ -200,6 +203,7 @@ Object {
200
203
  "repostCount": 0,
201
204
  "uri": "record(2)",
202
205
  "viewer": Object {
206
+ "bookmarked": false,
203
207
  "embeddingDisabled": false,
204
208
  "like": "record(8)",
205
209
  "threadMuted": false,