@atproto/api 0.15.13 → 0.15.15
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.
- package/CHANGELOG.md +14 -0
- package/dist/client/index.d.ts +6 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +12 -4
- package/dist/client/index.js.map +1 -1
- package/dist/client/lexicons.d.ts +418 -0
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +225 -0
- package/dist/client/lexicons.js.map +1 -1
- package/dist/client/types/app/bsky/notification/defs.d.ts +40 -0
- package/dist/client/types/app/bsky/notification/defs.d.ts.map +1 -1
- package/dist/client/types/app/bsky/notification/defs.js +36 -0
- package/dist/client/types/app/bsky/notification/defs.js.map +1 -1
- package/dist/client/types/app/bsky/notification/getPreferences.d.ts +22 -0
- package/dist/client/types/app/bsky/notification/getPreferences.d.ts.map +1 -0
- package/dist/client/types/app/bsky/notification/getPreferences.js +11 -0
- package/dist/client/types/app/bsky/notification/getPreferences.js.map +1 -0
- package/dist/client/types/app/bsky/notification/putPreferencesV2.d.ts +38 -0
- package/dist/client/types/app/bsky/notification/putPreferencesV2.d.ts.map +1 -0
- package/dist/client/types/app/bsky/notification/putPreferencesV2.js +11 -0
- package/dist/client/types/app/bsky/notification/putPreferencesV2.js.map +1 -0
- package/dist/moderation/decision.d.ts +2 -1
- package/dist/moderation/decision.d.ts.map +1 -1
- package/dist/moderation/decision.js +3 -2
- package/dist/moderation/decision.js.map +1 -1
- package/dist/moderation/index.d.ts +1 -1
- package/dist/moderation/index.d.ts.map +1 -1
- package/dist/moderation/index.js +2 -1
- package/dist/moderation/index.js.map +1 -1
- package/dist/moderation/mutewords.d.ts +22 -2
- package/dist/moderation/mutewords.d.ts.map +1 -1
- package/dist/moderation/mutewords.js +63 -25
- package/dist/moderation/mutewords.js.map +1 -1
- package/dist/moderation/subjects/post.js +49 -39
- package/dist/moderation/subjects/post.js.map +1 -1
- package/dist/moderation/types.d.ts +2 -0
- package/dist/moderation/types.d.ts.map +1 -1
- package/dist/moderation/types.js.map +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +28 -0
- package/src/client/lexicons.ts +227 -0
- package/src/client/types/app/bsky/notification/defs.ts +76 -0
- package/src/client/types/app/bsky/notification/getPreferences.ts +40 -0
- package/src/client/types/app/bsky/notification/putPreferencesV2.ts +56 -0
- package/src/moderation/decision.ts +4 -2
- package/src/moderation/index.ts +1 -1
- package/src/moderation/mutewords.ts +88 -26
- package/src/moderation/subjects/post.ts +104 -115
- package/src/moderation/types.ts +2 -0
- package/tests/moderation-mutewords.test.ts +153 -112
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -20,7 +20,7 @@ function decideSubject(subject, opts) {
|
|
|
20
20
|
}
|
|
21
21
|
acc.addHidden(checkHiddenPost(subject, opts.prefs.hiddenPosts));
|
|
22
22
|
if (!acc.isMe) {
|
|
23
|
-
acc.addMutedWord(
|
|
23
|
+
acc.addMutedWord(matchAllMuteWords(subject, opts.prefs.mutedWords));
|
|
24
24
|
}
|
|
25
25
|
return acc;
|
|
26
26
|
}
|
|
@@ -106,34 +106,36 @@ function checkHiddenPost(subject, hiddenPosts) {
|
|
|
106
106
|
}
|
|
107
107
|
return false;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function matchAllMuteWords(subject, mutedWords) {
|
|
110
110
|
if (!mutedWords?.length) {
|
|
111
|
-
return
|
|
111
|
+
return;
|
|
112
112
|
}
|
|
113
113
|
const postAuthor = subject.author;
|
|
114
114
|
if (client_1.AppBskyFeedPost.isRecord(subject.record)) {
|
|
115
115
|
const post = subject.record;
|
|
116
|
-
|
|
117
|
-
if ((0, mutewords_1.hasMutedWord)({
|
|
116
|
+
const matches = (0, mutewords_1.matchMuteWords)({
|
|
118
117
|
mutedWords,
|
|
119
118
|
text: post.text,
|
|
120
119
|
facets: post.facets,
|
|
121
120
|
outlineTags: post.tags,
|
|
122
121
|
languages: post.langs,
|
|
123
122
|
actor: postAuthor,
|
|
124
|
-
})
|
|
125
|
-
|
|
123
|
+
});
|
|
124
|
+
// post text
|
|
125
|
+
if (matches) {
|
|
126
|
+
return matches;
|
|
126
127
|
}
|
|
127
128
|
if (post.embed && client_1.AppBskyEmbedImages.isMain(post.embed)) {
|
|
128
129
|
// post images
|
|
129
130
|
for (const image of post.embed.images) {
|
|
130
|
-
|
|
131
|
+
const matches = (0, mutewords_1.matchMuteWords)({
|
|
131
132
|
mutedWords,
|
|
132
133
|
text: image.alt,
|
|
133
134
|
languages: post.langs,
|
|
134
135
|
actor: postAuthor,
|
|
135
|
-
})
|
|
136
|
-
|
|
136
|
+
});
|
|
137
|
+
if (matches) {
|
|
138
|
+
return matches;
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
}
|
|
@@ -147,67 +149,72 @@ function checkMutedWords(subject, mutedWords) {
|
|
|
147
149
|
if (client_1.AppBskyFeedPost.isRecord(embed.record.value)) {
|
|
148
150
|
const embeddedPost = embed.record.value;
|
|
149
151
|
const embedAuthor = embed.record.author;
|
|
150
|
-
|
|
151
|
-
if ((0, mutewords_1.hasMutedWord)({
|
|
152
|
+
const matches = (0, mutewords_1.matchMuteWords)({
|
|
152
153
|
mutedWords,
|
|
153
154
|
text: embeddedPost.text,
|
|
154
155
|
facets: embeddedPost.facets,
|
|
155
156
|
outlineTags: embeddedPost.tags,
|
|
156
157
|
languages: embeddedPost.langs,
|
|
157
158
|
actor: embedAuthor,
|
|
158
|
-
})
|
|
159
|
-
|
|
159
|
+
});
|
|
160
|
+
// quoted post text
|
|
161
|
+
if (matches) {
|
|
162
|
+
return matches;
|
|
160
163
|
}
|
|
161
164
|
// quoted post's images
|
|
162
165
|
if (client_1.AppBskyEmbedImages.isMain(embeddedPost.embed)) {
|
|
163
166
|
for (const image of embeddedPost.embed.images) {
|
|
164
|
-
|
|
167
|
+
const matches = (0, mutewords_1.matchMuteWords)({
|
|
165
168
|
mutedWords,
|
|
166
169
|
text: image.alt,
|
|
167
170
|
languages: embeddedPost.langs,
|
|
168
171
|
actor: embedAuthor,
|
|
169
|
-
})
|
|
170
|
-
|
|
172
|
+
});
|
|
173
|
+
if (matches) {
|
|
174
|
+
return matches;
|
|
171
175
|
}
|
|
172
176
|
}
|
|
173
177
|
}
|
|
174
178
|
// quoted post's link card
|
|
175
179
|
if (client_1.AppBskyEmbedExternal.isMain(embeddedPost.embed)) {
|
|
176
180
|
const { external } = embeddedPost.embed;
|
|
177
|
-
|
|
181
|
+
const matches = (0, mutewords_1.matchMuteWords)({
|
|
178
182
|
mutedWords,
|
|
179
183
|
text: external.title + ' ' + external.description,
|
|
180
184
|
languages: [],
|
|
181
185
|
actor: embedAuthor,
|
|
182
|
-
})
|
|
183
|
-
|
|
186
|
+
});
|
|
187
|
+
if (matches) {
|
|
188
|
+
return matches;
|
|
184
189
|
}
|
|
185
190
|
}
|
|
186
191
|
if (client_1.AppBskyEmbedRecordWithMedia.isMain(embeddedPost.embed)) {
|
|
187
192
|
// quoted post's link card when it did a quote + media
|
|
188
193
|
if (client_1.AppBskyEmbedExternal.isMain(embeddedPost.embed.media)) {
|
|
189
194
|
const { external } = embeddedPost.embed.media;
|
|
190
|
-
|
|
195
|
+
const matches = (0, mutewords_1.matchMuteWords)({
|
|
191
196
|
mutedWords,
|
|
192
197
|
text: external.title + ' ' + external.description,
|
|
193
198
|
languages: [],
|
|
194
199
|
actor: embedAuthor,
|
|
195
|
-
})
|
|
196
|
-
|
|
200
|
+
});
|
|
201
|
+
if (matches) {
|
|
202
|
+
return matches;
|
|
197
203
|
}
|
|
198
204
|
}
|
|
199
205
|
// quoted post's images when it did a quote + media
|
|
200
206
|
if (client_1.AppBskyEmbedImages.isMain(embeddedPost.embed.media)) {
|
|
201
207
|
for (const image of embeddedPost.embed.media.images) {
|
|
202
|
-
|
|
208
|
+
const matches = (0, mutewords_1.matchMuteWords)({
|
|
203
209
|
mutedWords,
|
|
204
210
|
text: image.alt,
|
|
205
211
|
languages: client_1.AppBskyFeedPost.isRecord(embeddedPost.record)
|
|
206
212
|
? embeddedPost.langs
|
|
207
213
|
: [],
|
|
208
214
|
actor: embedAuthor,
|
|
209
|
-
})
|
|
210
|
-
|
|
215
|
+
});
|
|
216
|
+
if (matches) {
|
|
217
|
+
return matches;
|
|
211
218
|
}
|
|
212
219
|
}
|
|
213
220
|
}
|
|
@@ -217,13 +224,14 @@ function checkMutedWords(subject, mutedWords) {
|
|
|
217
224
|
// link card
|
|
218
225
|
else if (client_1.AppBskyEmbedExternal.isView(embed)) {
|
|
219
226
|
const { external } = embed;
|
|
220
|
-
|
|
227
|
+
const matches = (0, mutewords_1.matchMuteWords)({
|
|
221
228
|
mutedWords,
|
|
222
229
|
text: external.title + ' ' + external.description,
|
|
223
230
|
languages: [],
|
|
224
231
|
actor: postAuthor,
|
|
225
|
-
})
|
|
226
|
-
|
|
232
|
+
});
|
|
233
|
+
if (matches) {
|
|
234
|
+
return matches;
|
|
227
235
|
}
|
|
228
236
|
}
|
|
229
237
|
// quote post with media
|
|
@@ -233,45 +241,47 @@ function checkMutedWords(subject, mutedWords) {
|
|
|
233
241
|
// quoted post text
|
|
234
242
|
if (client_1.AppBskyFeedPost.isRecord(embed.record.record.value)) {
|
|
235
243
|
const post = embed.record.record.value;
|
|
236
|
-
|
|
244
|
+
const matches = (0, mutewords_1.matchMuteWords)({
|
|
237
245
|
mutedWords,
|
|
238
246
|
text: post.text,
|
|
239
247
|
facets: post.facets,
|
|
240
248
|
outlineTags: post.tags,
|
|
241
249
|
languages: post.langs,
|
|
242
250
|
actor: embedAuthor,
|
|
243
|
-
})
|
|
244
|
-
|
|
251
|
+
});
|
|
252
|
+
if (matches) {
|
|
253
|
+
return matches;
|
|
245
254
|
}
|
|
246
255
|
}
|
|
247
256
|
// quoted post images
|
|
248
257
|
if (client_1.AppBskyEmbedImages.isView(embed.media)) {
|
|
249
258
|
for (const image of embed.media.images) {
|
|
250
|
-
|
|
259
|
+
const matches = (0, mutewords_1.matchMuteWords)({
|
|
251
260
|
mutedWords,
|
|
252
261
|
text: image.alt,
|
|
253
262
|
languages: client_1.AppBskyFeedPost.isRecord(subject.record)
|
|
254
263
|
? subject.record.langs
|
|
255
264
|
: [],
|
|
256
265
|
actor: embedAuthor,
|
|
257
|
-
})
|
|
258
|
-
|
|
266
|
+
});
|
|
267
|
+
if (matches) {
|
|
268
|
+
return matches;
|
|
259
269
|
}
|
|
260
270
|
}
|
|
261
271
|
}
|
|
262
272
|
if (client_1.AppBskyEmbedExternal.isView(embed.media)) {
|
|
263
273
|
const { external } = embed.media;
|
|
264
|
-
|
|
274
|
+
const matches = (0, mutewords_1.matchMuteWords)({
|
|
265
275
|
mutedWords,
|
|
266
276
|
text: external.title + ' ' + external.description,
|
|
267
277
|
languages: [],
|
|
268
278
|
actor: embedAuthor,
|
|
269
|
-
})
|
|
270
|
-
|
|
279
|
+
});
|
|
280
|
+
if (matches) {
|
|
281
|
+
return matches;
|
|
271
282
|
}
|
|
272
283
|
}
|
|
273
284
|
}
|
|
274
285
|
}
|
|
275
|
-
return false;
|
|
276
286
|
}
|
|
277
287
|
//# sourceMappingURL=post.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post.js","sourceRoot":"","sources":["../../../src/moderation/subjects/post.ts"],"names":[],"mappings":";;AAeA,gCAUC;AAzBD,yCAOqB;AAErB,0CAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"post.js","sourceRoot":"","sources":["../../../src/moderation/subjects/post.ts"],"names":[],"mappings":";;AAeA,gCAUC;AAzBD,yCAOqB;AAErB,0CAAgD;AAChD,4CAA4D;AAE5D,uCAAyC;AACzC,uCAAyC;AAEzC,SAAgB,UAAU,CACxB,OAA8B,EAC9B,IAAoB;IAEpB,OAAO,6BAAkB,CAAC,KAAK,CAC7B,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,EAC5B,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,EAC7C,IAAA,uBA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A,0BAAc,EAAC;wBAC7B,UAAU;wBACV,IAAI,EAAE,KAAK,CAAC,GAAG;wBACf,SAAS,EAAE,wBAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;4BACjD,CAAC,CAAE,OAAO,CAAC,MAAiC,CAAC,KAAK;4BAClD,CAAC,CAAC,EAAE;wBACN,KAAK,EAAE,WAAW;qBACnB,CAAC,CAAA;oBACF,IAAI,OAAO,EAAE,CAAC;wBACZ,OAAO,OAAO,CAAA;oBAChB,CAAC;gBACH,CAAC;YACH,CAAC;YAED,IAAI,6BAAoB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC7C,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC,KAAK,CAAA;gBAChC,MAAM,OAAO,GAAG,IAAA,0BAAc,EAAC;oBAC7B,UAAU;oBACV,IAAI,EAAE,QAAQ,CAAC,KAAK,GAAG,GAAG,GAAG,QAAQ,CAAC,WAAW;oBACjD,SAAS,EAAE,EAAE;oBACb,KAAK,EAAE,WAAW;iBACnB,CAAC,CAAA;gBACF,IAAI,OAAO,EAAE,CAAC;oBACZ,OAAO,OAAO,CAAA;gBAChB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AppBskyActorDefs, AppBskyFeedDefs, AppBskyGraphDefs, AppBskyNotificationListNotifications, ChatBskyActorDefs, ComAtprotoLabelDefs } from '../client/index';
|
|
2
2
|
import { KnownLabelValue } from './const/labels';
|
|
3
|
+
import { MuteWordMatch } from './mutewords';
|
|
3
4
|
export declare const CUSTOM_LABEL_VALUE_RE: RegExp;
|
|
4
5
|
export interface ModerationBehavior {
|
|
5
6
|
profileList?: 'blur' | 'alert' | 'inform';
|
|
@@ -83,6 +84,7 @@ export type ModerationCause = {
|
|
|
83
84
|
source: ModerationCauseSource;
|
|
84
85
|
priority: 6;
|
|
85
86
|
downgraded?: boolean;
|
|
87
|
+
matches: MuteWordMatch[];
|
|
86
88
|
} | {
|
|
87
89
|
type: 'hidden';
|
|
88
90
|
source: ModerationCauseSource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/moderation/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,oCAAoC,EACpC,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/moderation/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,oCAAoC,EACpC,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAK3C,eAAO,MAAM,qBAAqB,QAAc,CAAA;AAKhD,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;IACzC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;IACzC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;IACzC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;IACzC,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AACD,eAAO,MAAM,cAAc,EAAE,kBAO5B,CAAA;AACD,eAAO,MAAM,aAAa,EAAE,kBAK3B,CAAA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,qBAAqB,CAAA;IAC7B,QAAQ,EAAE,CAAC,CAAA;IACX,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,GACD;IACE,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,qBAAqB,CAAA;IAC7B,QAAQ,EAAE,CAAC,CAAA;IACX,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,EAAE,aAAa,EAAE,CAAA;CACzB,GACD;IACE,IAAI,EAAE,QAAQ,CAAA;IACd,MAAM,EAAE,qBAAqB,CAAA;IAC7B,QAAQ,EAAE,CAAC,CAAA;IACX,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAEL,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;CACxC;AAED,MAAM,WAAW,eAAe;IAC9B,mBAAmB,EAAE,OAAO,CAAA;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IACvC,QAAQ,EAAE,sBAAsB,EAAE,CAAA;IAClC,UAAU,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAA;IACxC,WAAW,EAAE,MAAM,EAAE,CAAA;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,EAAE,eAAe,CAAA;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,CAAC,CAAA;CAC9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/moderation/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/moderation/types.ts"],"names":[],"mappings":";;;AAWA,SAAS;AACT,IAAI;AAES,QAAA,qBAAqB,GAAG,WAAW,CAAA;AAenC,QAAA,cAAc,GAAuB;IAChD,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,MAAM;CACpB,CAAA;AACY,QAAA,aAAa,GAAuB;IAC/C,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,QAAQ;CACtB,CAAA;AACY,QAAA,iBAAiB,GAAuB;IACnD,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,MAAM;CACpB,CAAA;AACY,QAAA,aAAa,GAAuB;IAC/C,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,MAAM;CACpB,CAAA;AACY,QAAA,aAAa,GAAuB,EAAE,CAAA"}
|
package/package.json
CHANGED
package/src/client/index.ts
CHANGED
|
@@ -174,9 +174,11 @@ import * as AppBskyLabelerDefs from './types/app/bsky/labeler/defs.js'
|
|
|
174
174
|
import * as AppBskyLabelerGetServices from './types/app/bsky/labeler/getServices.js'
|
|
175
175
|
import * as AppBskyLabelerService from './types/app/bsky/labeler/service.js'
|
|
176
176
|
import * as AppBskyNotificationDefs from './types/app/bsky/notification/defs.js'
|
|
177
|
+
import * as AppBskyNotificationGetPreferences from './types/app/bsky/notification/getPreferences.js'
|
|
177
178
|
import * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notification/getUnreadCount.js'
|
|
178
179
|
import * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications.js'
|
|
179
180
|
import * as AppBskyNotificationPutPreferences from './types/app/bsky/notification/putPreferences.js'
|
|
181
|
+
import * as AppBskyNotificationPutPreferencesV2 from './types/app/bsky/notification/putPreferencesV2.js'
|
|
180
182
|
import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush.js'
|
|
181
183
|
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js'
|
|
182
184
|
import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet.js'
|
|
@@ -437,9 +439,11 @@ export * as AppBskyLabelerDefs from './types/app/bsky/labeler/defs.js'
|
|
|
437
439
|
export * as AppBskyLabelerGetServices from './types/app/bsky/labeler/getServices.js'
|
|
438
440
|
export * as AppBskyLabelerService from './types/app/bsky/labeler/service.js'
|
|
439
441
|
export * as AppBskyNotificationDefs from './types/app/bsky/notification/defs.js'
|
|
442
|
+
export * as AppBskyNotificationGetPreferences from './types/app/bsky/notification/getPreferences.js'
|
|
440
443
|
export * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notification/getUnreadCount.js'
|
|
441
444
|
export * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications.js'
|
|
442
445
|
export * as AppBskyNotificationPutPreferences from './types/app/bsky/notification/putPreferences.js'
|
|
446
|
+
export * as AppBskyNotificationPutPreferencesV2 from './types/app/bsky/notification/putPreferencesV2.js'
|
|
443
447
|
export * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush.js'
|
|
444
448
|
export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js'
|
|
445
449
|
export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet.js'
|
|
@@ -3343,6 +3347,18 @@ export class AppBskyNotificationNS {
|
|
|
3343
3347
|
this._client = client
|
|
3344
3348
|
}
|
|
3345
3349
|
|
|
3350
|
+
getPreferences(
|
|
3351
|
+
params?: AppBskyNotificationGetPreferences.QueryParams,
|
|
3352
|
+
opts?: AppBskyNotificationGetPreferences.CallOptions,
|
|
3353
|
+
): Promise<AppBskyNotificationGetPreferences.Response> {
|
|
3354
|
+
return this._client.call(
|
|
3355
|
+
'app.bsky.notification.getPreferences',
|
|
3356
|
+
params,
|
|
3357
|
+
undefined,
|
|
3358
|
+
opts,
|
|
3359
|
+
)
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3346
3362
|
getUnreadCount(
|
|
3347
3363
|
params?: AppBskyNotificationGetUnreadCount.QueryParams,
|
|
3348
3364
|
opts?: AppBskyNotificationGetUnreadCount.CallOptions,
|
|
@@ -3379,6 +3395,18 @@ export class AppBskyNotificationNS {
|
|
|
3379
3395
|
)
|
|
3380
3396
|
}
|
|
3381
3397
|
|
|
3398
|
+
putPreferencesV2(
|
|
3399
|
+
data?: AppBskyNotificationPutPreferencesV2.InputSchema,
|
|
3400
|
+
opts?: AppBskyNotificationPutPreferencesV2.CallOptions,
|
|
3401
|
+
): Promise<AppBskyNotificationPutPreferencesV2.Response> {
|
|
3402
|
+
return this._client.call(
|
|
3403
|
+
'app.bsky.notification.putPreferencesV2',
|
|
3404
|
+
opts?.qp,
|
|
3405
|
+
data,
|
|
3406
|
+
opts,
|
|
3407
|
+
)
|
|
3408
|
+
}
|
|
3409
|
+
|
|
3382
3410
|
registerPush(
|
|
3383
3411
|
data?: AppBskyNotificationRegisterPush.InputSchema,
|
|
3384
3412
|
opts?: AppBskyNotificationRegisterPush.CallOptions,
|
package/src/client/lexicons.ts
CHANGED
|
@@ -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',
|
|
@@ -16557,10 +16782,12 @@ export const ids = {
|
|
|
16557
16782
|
AppBskyLabelerGetServices: 'app.bsky.labeler.getServices',
|
|
16558
16783
|
AppBskyLabelerService: 'app.bsky.labeler.service',
|
|
16559
16784
|
AppBskyNotificationDefs: 'app.bsky.notification.defs',
|
|
16785
|
+
AppBskyNotificationGetPreferences: 'app.bsky.notification.getPreferences',
|
|
16560
16786
|
AppBskyNotificationGetUnreadCount: 'app.bsky.notification.getUnreadCount',
|
|
16561
16787
|
AppBskyNotificationListNotifications:
|
|
16562
16788
|
'app.bsky.notification.listNotifications',
|
|
16563
16789
|
AppBskyNotificationPutPreferences: 'app.bsky.notification.putPreferences',
|
|
16790
|
+
AppBskyNotificationPutPreferencesV2: 'app.bsky.notification.putPreferencesV2',
|
|
16564
16791
|
AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush',
|
|
16565
16792
|
AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
|
|
16566
16793
|
AppBskyRichtextFacet: 'app.bsky.richtext.facet',
|