@atproto/bsky 0.0.156 → 0.0.158

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 (130) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/api/app/bsky/notification/getPreferences.d.ts +4 -0
  3. package/dist/api/app/bsky/notification/getPreferences.d.ts.map +1 -0
  4. package/dist/api/app/bsky/notification/getPreferences.js +39 -0
  5. package/dist/api/app/bsky/notification/getPreferences.js.map +1 -0
  6. package/dist/api/app/bsky/notification/putPreferencesV2.d.ts +4 -0
  7. package/dist/api/app/bsky/notification/putPreferencesV2.d.ts.map +1 -0
  8. package/dist/api/app/bsky/notification/putPreferencesV2.js +47 -0
  9. package/dist/api/app/bsky/notification/putPreferencesV2.js.map +1 -0
  10. package/dist/api/app/bsky/notification/util.d.ts +9 -0
  11. package/dist/api/app/bsky/notification/util.d.ts.map +1 -0
  12. package/dist/api/app/bsky/notification/util.js +84 -0
  13. package/dist/api/app/bsky/notification/util.js.map +1 -0
  14. package/dist/api/index.d.ts.map +1 -1
  15. package/dist/api/index.js +4 -0
  16. package/dist/api/index.js.map +1 -1
  17. package/dist/context.d.ts +3 -0
  18. package/dist/context.d.ts.map +1 -1
  19. package/dist/context.js +3 -0
  20. package/dist/context.js.map +1 -1
  21. package/dist/data-plane/bsync/index.d.ts.map +1 -1
  22. package/dist/data-plane/bsync/index.js +84 -0
  23. package/dist/data-plane/bsync/index.js.map +1 -1
  24. package/dist/data-plane/server/db/database-schema.d.ts +2 -1
  25. package/dist/data-plane/server/db/database-schema.d.ts.map +1 -1
  26. package/dist/data-plane/server/db/db.d.ts +1 -0
  27. package/dist/data-plane/server/db/db.d.ts.map +1 -1
  28. package/dist/data-plane/server/db/db.js.map +1 -1
  29. package/dist/data-plane/server/db/index.d.ts +1 -0
  30. package/dist/data-plane/server/db/index.d.ts.map +1 -1
  31. package/dist/data-plane/server/db/migrations/20250602T190357447Z-add-private-data.d.ts +4 -0
  32. package/dist/data-plane/server/db/migrations/20250602T190357447Z-add-private-data.d.ts.map +1 -0
  33. package/dist/data-plane/server/db/migrations/20250602T190357447Z-add-private-data.js +24 -0
  34. package/dist/data-plane/server/db/migrations/20250602T190357447Z-add-private-data.js.map +1 -0
  35. package/dist/data-plane/server/db/migrations/index.d.ts +1 -0
  36. package/dist/data-plane/server/db/migrations/index.d.ts.map +1 -1
  37. package/dist/data-plane/server/db/migrations/index.js +2 -1
  38. package/dist/data-plane/server/db/migrations/index.js.map +1 -1
  39. package/dist/data-plane/server/db/tables/private-data.d.ts +13 -0
  40. package/dist/data-plane/server/db/tables/private-data.d.ts.map +1 -0
  41. package/dist/data-plane/server/db/tables/private-data.js +5 -0
  42. package/dist/data-plane/server/db/tables/private-data.js.map +1 -0
  43. package/dist/data-plane/server/db/tables/record.d.ts +2 -1
  44. package/dist/data-plane/server/db/tables/record.d.ts.map +1 -1
  45. package/dist/data-plane/server/db/tables/record.js.map +1 -1
  46. package/dist/data-plane/server/index.d.ts +2 -1
  47. package/dist/data-plane/server/index.d.ts.map +1 -1
  48. package/dist/data-plane/server/index.js.map +1 -1
  49. package/dist/data-plane/server/routes/index.d.ts.map +1 -1
  50. package/dist/data-plane/server/routes/index.js +2 -0
  51. package/dist/data-plane/server/routes/index.js.map +1 -1
  52. package/dist/data-plane/server/routes/private-data.d.ts +9 -0
  53. package/dist/data-plane/server/routes/private-data.d.ts.map +1 -0
  54. package/dist/data-plane/server/routes/private-data.js +64 -0
  55. package/dist/data-plane/server/routes/private-data.js.map +1 -0
  56. package/dist/data-plane/server/util.d.ts +6 -6
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +3 -0
  59. package/dist/index.js.map +1 -1
  60. package/dist/lexicon/index.d.ts +4 -0
  61. package/dist/lexicon/index.d.ts.map +1 -1
  62. package/dist/lexicon/index.js +8 -0
  63. package/dist/lexicon/index.js.map +1 -1
  64. package/dist/lexicon/lexicons.d.ts +418 -0
  65. package/dist/lexicon/lexicons.d.ts.map +1 -1
  66. package/dist/lexicon/lexicons.js +225 -0
  67. package/dist/lexicon/lexicons.js.map +1 -1
  68. package/dist/lexicon/types/app/bsky/notification/defs.d.ts +40 -0
  69. package/dist/lexicon/types/app/bsky/notification/defs.d.ts.map +1 -1
  70. package/dist/lexicon/types/app/bsky/notification/defs.js +36 -0
  71. package/dist/lexicon/types/app/bsky/notification/defs.js.map +1 -1
  72. package/dist/lexicon/types/app/bsky/notification/getPreferences.d.ts +35 -0
  73. package/dist/lexicon/types/app/bsky/notification/getPreferences.d.ts.map +1 -0
  74. package/dist/lexicon/types/app/bsky/notification/getPreferences.js +7 -0
  75. package/dist/lexicon/types/app/bsky/notification/getPreferences.js.map +1 -0
  76. package/dist/lexicon/types/app/bsky/notification/putPreferencesV2.d.ts +52 -0
  77. package/dist/lexicon/types/app/bsky/notification/putPreferencesV2.d.ts.map +1 -0
  78. package/dist/lexicon/types/app/bsky/notification/putPreferencesV2.js +7 -0
  79. package/dist/lexicon/types/app/bsky/notification/putPreferencesV2.js.map +1 -0
  80. package/dist/proto/bsky_connect.d.ts +10 -1
  81. package/dist/proto/bsky_connect.d.ts.map +1 -1
  82. package/dist/proto/bsky_connect.js +9 -0
  83. package/dist/proto/bsky_connect.js.map +1 -1
  84. package/dist/proto/bsky_pb.d.ts +238 -0
  85. package/dist/proto/bsky_pb.d.ts.map +1 -1
  86. package/dist/proto/bsky_pb.js +703 -5
  87. package/dist/proto/bsky_pb.js.map +1 -1
  88. package/dist/proto/bsync_pb.d.ts +10 -10
  89. package/dist/proto/bsync_pb.d.ts.map +1 -1
  90. package/dist/proto/bsync_pb.js +15 -15
  91. package/dist/proto/bsync_pb.js.map +1 -1
  92. package/dist/stash.d.ts +26 -0
  93. package/dist/stash.d.ts.map +1 -0
  94. package/dist/stash.js +56 -0
  95. package/dist/stash.js.map +1 -0
  96. package/package.json +8 -8
  97. package/proto/bsky.proto +62 -0
  98. package/src/api/app/bsky/notification/getPreferences.ts +50 -0
  99. package/src/api/app/bsky/notification/putPreferencesV2.ts +62 -0
  100. package/src/api/app/bsky/notification/util.ts +123 -0
  101. package/src/api/index.ts +4 -0
  102. package/src/context.ts +6 -0
  103. package/src/data-plane/bsync/index.ts +109 -1
  104. package/src/data-plane/server/db/database-schema.ts +3 -1
  105. package/src/data-plane/server/db/db.ts +2 -0
  106. package/src/data-plane/server/db/index.ts +1 -0
  107. package/src/data-plane/server/db/migrations/20250602T190357447Z-add-private-data.ts +22 -0
  108. package/src/data-plane/server/db/migrations/index.ts +1 -0
  109. package/src/data-plane/server/db/tables/private-data.ts +13 -0
  110. package/src/data-plane/server/db/tables/record.ts +3 -1
  111. package/src/data-plane/server/index.ts +3 -1
  112. package/src/data-plane/server/routes/index.ts +2 -0
  113. package/src/data-plane/server/routes/private-data.ts +94 -0
  114. package/src/index.ts +4 -0
  115. package/src/lexicon/index.ts +24 -0
  116. package/src/lexicon/lexicons.ts +227 -0
  117. package/src/lexicon/types/app/bsky/notification/defs.ts +76 -0
  118. package/src/lexicon/types/app/bsky/notification/getPreferences.ts +52 -0
  119. package/src/lexicon/types/app/bsky/notification/putPreferencesV2.ts +69 -0
  120. package/src/proto/bsky_connect.ts +11 -0
  121. package/src/proto/bsky_pb.ts +675 -0
  122. package/src/proto/bsync_pb.ts +15 -15
  123. package/src/stash.ts +75 -0
  124. package/tests/stash.test.ts +156 -0
  125. package/tests/views/notifications.test.ts +221 -0
  126. package/tests/views/thread-v2.test.ts +31 -33
  127. package/tsconfig.build.tsbuildinfo +1 -1
  128. package/tsconfig.tests.tsbuildinfo +1 -1
  129. package/tests/seed/thread-v2.ts +0 -874
  130. package/tests/seed/util.ts +0 -52
@@ -9732,6 +9732,147 @@ export const schemaDict = {
9732
9732
  type: 'object',
9733
9733
  properties: {},
9734
9734
  },
9735
+ chatPreference: {
9736
+ type: 'object',
9737
+ required: ['filter', 'push'],
9738
+ properties: {
9739
+ filter: {
9740
+ type: 'string',
9741
+ knownValues: ['all', 'accepted'],
9742
+ },
9743
+ push: {
9744
+ type: 'boolean',
9745
+ },
9746
+ },
9747
+ },
9748
+ filterablePreference: {
9749
+ type: 'object',
9750
+ required: ['filter', 'list', 'push'],
9751
+ properties: {
9752
+ filter: {
9753
+ type: 'string',
9754
+ knownValues: ['all', 'follows'],
9755
+ },
9756
+ list: {
9757
+ type: 'boolean',
9758
+ },
9759
+ push: {
9760
+ type: 'boolean',
9761
+ },
9762
+ },
9763
+ },
9764
+ preference: {
9765
+ type: 'object',
9766
+ required: ['list', 'push'],
9767
+ properties: {
9768
+ list: {
9769
+ type: 'boolean',
9770
+ },
9771
+ push: {
9772
+ type: 'boolean',
9773
+ },
9774
+ },
9775
+ },
9776
+ preferences: {
9777
+ type: 'object',
9778
+ required: [
9779
+ 'chat',
9780
+ 'follow',
9781
+ 'like',
9782
+ 'likeViaRepost',
9783
+ 'mention',
9784
+ 'quote',
9785
+ 'reply',
9786
+ 'repost',
9787
+ 'repostViaRepost',
9788
+ 'starterpackJoined',
9789
+ 'subscribedPost',
9790
+ 'unverified',
9791
+ 'verified',
9792
+ ],
9793
+ properties: {
9794
+ chat: {
9795
+ type: 'ref',
9796
+ ref: 'lex:app.bsky.notification.defs#chatPreference',
9797
+ },
9798
+ follow: {
9799
+ type: 'ref',
9800
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
9801
+ },
9802
+ like: {
9803
+ type: 'ref',
9804
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
9805
+ },
9806
+ likeViaRepost: {
9807
+ type: 'ref',
9808
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
9809
+ },
9810
+ mention: {
9811
+ type: 'ref',
9812
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
9813
+ },
9814
+ quote: {
9815
+ type: 'ref',
9816
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
9817
+ },
9818
+ reply: {
9819
+ type: 'ref',
9820
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
9821
+ },
9822
+ repost: {
9823
+ type: 'ref',
9824
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
9825
+ },
9826
+ repostViaRepost: {
9827
+ type: 'ref',
9828
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
9829
+ },
9830
+ starterpackJoined: {
9831
+ type: 'ref',
9832
+ ref: 'lex:app.bsky.notification.defs#preference',
9833
+ },
9834
+ subscribedPost: {
9835
+ type: 'ref',
9836
+ ref: 'lex:app.bsky.notification.defs#preference',
9837
+ },
9838
+ unverified: {
9839
+ type: 'ref',
9840
+ ref: 'lex:app.bsky.notification.defs#preference',
9841
+ },
9842
+ verified: {
9843
+ type: 'ref',
9844
+ ref: 'lex:app.bsky.notification.defs#preference',
9845
+ },
9846
+ },
9847
+ },
9848
+ },
9849
+ },
9850
+ AppBskyNotificationGetPreferences: {
9851
+ lexicon: 1,
9852
+ id: 'app.bsky.notification.getPreferences',
9853
+ defs: {
9854
+ main: {
9855
+ type: 'query',
9856
+ description:
9857
+ 'Get notification-related preferences for an account. Requires auth.',
9858
+ parameters: {
9859
+ type: 'params',
9860
+ properties: {},
9861
+ },
9862
+ output: {
9863
+ encoding: 'application/json',
9864
+ schema: {
9865
+ type: 'object',
9866
+ required: ['preferences'],
9867
+ properties: {
9868
+ preferences: {
9869
+ type: 'ref',
9870
+ ref: 'lex:app.bsky.notification.defs#preferences',
9871
+ },
9872
+ },
9873
+ },
9874
+ },
9875
+ },
9735
9876
  },
9736
9877
  },
9737
9878
  AppBskyNotificationGetUnreadCount: {
@@ -9924,6 +10065,90 @@ export const schemaDict = {
9924
10065
  },
9925
10066
  },
9926
10067
  },
10068
+ AppBskyNotificationPutPreferencesV2: {
10069
+ lexicon: 1,
10070
+ id: 'app.bsky.notification.putPreferencesV2',
10071
+ defs: {
10072
+ main: {
10073
+ type: 'procedure',
10074
+ description:
10075
+ 'Set notification-related preferences for an account. Requires auth.',
10076
+ input: {
10077
+ encoding: 'application/json',
10078
+ schema: {
10079
+ type: 'object',
10080
+ properties: {
10081
+ chat: {
10082
+ type: 'ref',
10083
+ ref: 'lex:app.bsky.notification.defs#chatPreference',
10084
+ },
10085
+ follow: {
10086
+ type: 'ref',
10087
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
10088
+ },
10089
+ like: {
10090
+ type: 'ref',
10091
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
10092
+ },
10093
+ likeViaRepost: {
10094
+ type: 'ref',
10095
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
10096
+ },
10097
+ mention: {
10098
+ type: 'ref',
10099
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
10100
+ },
10101
+ quote: {
10102
+ type: 'ref',
10103
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
10104
+ },
10105
+ reply: {
10106
+ type: 'ref',
10107
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
10108
+ },
10109
+ repost: {
10110
+ type: 'ref',
10111
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
10112
+ },
10113
+ repostViaRepost: {
10114
+ type: 'ref',
10115
+ ref: 'lex:app.bsky.notification.defs#filterablePreference',
10116
+ },
10117
+ starterpackJoined: {
10118
+ type: 'ref',
10119
+ ref: 'lex:app.bsky.notification.defs#preference',
10120
+ },
10121
+ subscribedPost: {
10122
+ type: 'ref',
10123
+ ref: 'lex:app.bsky.notification.defs#preference',
10124
+ },
10125
+ unverified: {
10126
+ type: 'ref',
10127
+ ref: 'lex:app.bsky.notification.defs#preference',
10128
+ },
10129
+ verified: {
10130
+ type: 'ref',
10131
+ ref: 'lex:app.bsky.notification.defs#preference',
10132
+ },
10133
+ },
10134
+ },
10135
+ },
10136
+ output: {
10137
+ encoding: 'application/json',
10138
+ schema: {
10139
+ type: 'object',
10140
+ required: ['preferences'],
10141
+ properties: {
10142
+ preferences: {
10143
+ type: 'ref',
10144
+ ref: 'lex:app.bsky.notification.defs#preferences',
10145
+ },
10146
+ },
10147
+ },
10148
+ },
10149
+ },
10150
+ },
10151
+ },
9927
10152
  AppBskyNotificationRegisterPush: {
9928
10153
  lexicon: 1,
9929
10154
  id: 'app.bsky.notification.registerPush',
@@ -12939,10 +13164,12 @@ export const ids = {
12939
13164
  AppBskyLabelerGetServices: 'app.bsky.labeler.getServices',
12940
13165
  AppBskyLabelerService: 'app.bsky.labeler.service',
12941
13166
  AppBskyNotificationDefs: 'app.bsky.notification.defs',
13167
+ AppBskyNotificationGetPreferences: 'app.bsky.notification.getPreferences',
12942
13168
  AppBskyNotificationGetUnreadCount: 'app.bsky.notification.getUnreadCount',
12943
13169
  AppBskyNotificationListNotifications:
12944
13170
  'app.bsky.notification.listNotifications',
12945
13171
  AppBskyNotificationPutPreferences: 'app.bsky.notification.putPreferences',
13172
+ AppBskyNotificationPutPreferencesV2: 'app.bsky.notification.putPreferencesV2',
12946
13173
  AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush',
12947
13174
  AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
12948
13175
  AppBskyRichtextFacet: 'app.bsky.richtext.facet',
@@ -27,3 +27,79 @@ export function isRecordDeleted<V>(v: V) {
27
27
  export function validateRecordDeleted<V>(v: V) {
28
28
  return validate<RecordDeleted & V>(v, id, hashRecordDeleted)
29
29
  }
30
+
31
+ export interface ChatPreference {
32
+ $type?: 'app.bsky.notification.defs#chatPreference'
33
+ filter: 'all' | 'accepted' | (string & {})
34
+ push: boolean
35
+ }
36
+
37
+ const hashChatPreference = 'chatPreference'
38
+
39
+ export function isChatPreference<V>(v: V) {
40
+ return is$typed(v, id, hashChatPreference)
41
+ }
42
+
43
+ export function validateChatPreference<V>(v: V) {
44
+ return validate<ChatPreference & V>(v, id, hashChatPreference)
45
+ }
46
+
47
+ export interface FilterablePreference {
48
+ $type?: 'app.bsky.notification.defs#filterablePreference'
49
+ filter: 'all' | 'follows' | (string & {})
50
+ list: boolean
51
+ push: boolean
52
+ }
53
+
54
+ const hashFilterablePreference = 'filterablePreference'
55
+
56
+ export function isFilterablePreference<V>(v: V) {
57
+ return is$typed(v, id, hashFilterablePreference)
58
+ }
59
+
60
+ export function validateFilterablePreference<V>(v: V) {
61
+ return validate<FilterablePreference & V>(v, id, hashFilterablePreference)
62
+ }
63
+
64
+ export interface Preference {
65
+ $type?: 'app.bsky.notification.defs#preference'
66
+ list: boolean
67
+ push: boolean
68
+ }
69
+
70
+ const hashPreference = 'preference'
71
+
72
+ export function isPreference<V>(v: V) {
73
+ return is$typed(v, id, hashPreference)
74
+ }
75
+
76
+ export function validatePreference<V>(v: V) {
77
+ return validate<Preference & V>(v, id, hashPreference)
78
+ }
79
+
80
+ export interface Preferences {
81
+ $type?: 'app.bsky.notification.defs#preferences'
82
+ chat: ChatPreference
83
+ follow: FilterablePreference
84
+ like: FilterablePreference
85
+ likeViaRepost: FilterablePreference
86
+ mention: FilterablePreference
87
+ quote: FilterablePreference
88
+ reply: FilterablePreference
89
+ repost: FilterablePreference
90
+ repostViaRepost: FilterablePreference
91
+ starterpackJoined: Preference
92
+ subscribedPost: Preference
93
+ unverified: Preference
94
+ verified: Preference
95
+ }
96
+
97
+ const hashPreferences = 'preferences'
98
+
99
+ export function isPreferences<V>(v: V) {
100
+ return is$typed(v, id, hashPreferences)
101
+ }
102
+
103
+ export function validatePreferences<V>(v: V) {
104
+ return validate<Preferences & V>(v, id, hashPreferences)
105
+ }
@@ -0,0 +1,52 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
14
+ import type * as AppBskyNotificationDefs from './defs.js'
15
+
16
+ const is$typed = _is$typed,
17
+ validate = _validate
18
+ const id = 'app.bsky.notification.getPreferences'
19
+
20
+ export interface QueryParams {}
21
+
22
+ export type InputSchema = undefined
23
+
24
+ export interface OutputSchema {
25
+ preferences: AppBskyNotificationDefs.Preferences
26
+ }
27
+
28
+ export type HandlerInput = undefined
29
+
30
+ export interface HandlerSuccess {
31
+ encoding: 'application/json'
32
+ body: OutputSchema
33
+ headers?: { [key: string]: string }
34
+ }
35
+
36
+ export interface HandlerError {
37
+ status: number
38
+ message?: string
39
+ }
40
+
41
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
42
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
43
+ auth: HA
44
+ params: QueryParams
45
+ input: HandlerInput
46
+ req: express.Request
47
+ res: express.Response
48
+ resetRouteRateLimits: () => Promise<void>
49
+ }
50
+ export type Handler<HA extends HandlerAuth = never> = (
51
+ ctx: HandlerReqCtx<HA>,
52
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -0,0 +1,69 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
14
+ import type * as AppBskyNotificationDefs from './defs.js'
15
+
16
+ const is$typed = _is$typed,
17
+ validate = _validate
18
+ const id = 'app.bsky.notification.putPreferencesV2'
19
+
20
+ export interface QueryParams {}
21
+
22
+ export interface InputSchema {
23
+ chat?: AppBskyNotificationDefs.ChatPreference
24
+ follow?: AppBskyNotificationDefs.FilterablePreference
25
+ like?: AppBskyNotificationDefs.FilterablePreference
26
+ likeViaRepost?: AppBskyNotificationDefs.FilterablePreference
27
+ mention?: AppBskyNotificationDefs.FilterablePreference
28
+ quote?: AppBskyNotificationDefs.FilterablePreference
29
+ reply?: AppBskyNotificationDefs.FilterablePreference
30
+ repost?: AppBskyNotificationDefs.FilterablePreference
31
+ repostViaRepost?: AppBskyNotificationDefs.FilterablePreference
32
+ starterpackJoined?: AppBskyNotificationDefs.Preference
33
+ subscribedPost?: AppBskyNotificationDefs.Preference
34
+ unverified?: AppBskyNotificationDefs.Preference
35
+ verified?: AppBskyNotificationDefs.Preference
36
+ }
37
+
38
+ export interface OutputSchema {
39
+ preferences: AppBskyNotificationDefs.Preferences
40
+ }
41
+
42
+ export interface HandlerInput {
43
+ encoding: 'application/json'
44
+ body: InputSchema
45
+ }
46
+
47
+ export interface HandlerSuccess {
48
+ encoding: 'application/json'
49
+ body: OutputSchema
50
+ headers?: { [key: string]: string }
51
+ }
52
+
53
+ export interface HandlerError {
54
+ status: number
55
+ message?: string
56
+ }
57
+
58
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
59
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
60
+ auth: HA
61
+ params: QueryParams
62
+ input: HandlerInput
63
+ req: express.Request
64
+ res: express.Response
65
+ resetRouteRateLimits: () => Promise<void>
66
+ }
67
+ export type Handler<HA extends HandlerAuth = never> = (
68
+ ctx: HandlerReqCtx<HA>,
69
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -126,6 +126,8 @@ import {
126
126
  GetMutesResponse,
127
127
  GetNewUserCountForRangeRequest,
128
128
  GetNewUserCountForRangeResponse,
129
+ GetNotificationPreferencesRequest,
130
+ GetNotificationPreferencesResponse,
129
131
  GetNotificationSeenRequest,
130
132
  GetNotificationSeenResponse,
131
133
  GetNotificationsRequest,
@@ -732,6 +734,15 @@ export const Service = {
732
734
  /**
733
735
  * Notifications
734
736
  *
737
+ * @generated from rpc bsky.Service.GetNotificationPreferences
738
+ */
739
+ getNotificationPreferences: {
740
+ name: 'GetNotificationPreferences',
741
+ I: GetNotificationPreferencesRequest,
742
+ O: GetNotificationPreferencesResponse,
743
+ kind: MethodKind.Unary,
744
+ },
745
+ /**
735
746
  * @generated from rpc bsky.Service.GetNotifications
736
747
  */
737
748
  getNotifications: {