@atproto/api 0.13.31 → 0.13.33
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 +23 -0
- package/README.md +1 -1
- package/dist/agent.d.ts +1 -0
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +43 -1
- package/dist/agent.js.map +1 -1
- package/dist/client/lexicons.d.ts +64 -2
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +36 -0
- package/dist/client/lexicons.js.map +1 -1
- package/dist/client/types/app/bsky/actor/defs.d.ts +19 -1
- package/dist/client/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/client/types/app/bsky/actor/defs.js +10 -0
- package/dist/client/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/client/types/app/bsky/feed/postgate.d.ts +1 -0
- package/dist/client/types/app/bsky/feed/postgate.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/postgate.js.map +1 -1
- package/dist/client/types/app/bsky/feed/threadgate.d.ts +1 -0
- package/dist/client/types/app/bsky/feed/threadgate.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/threadgate.js.map +1 -1
- package/dist/client/types/tools/ozone/moderation/defs.d.ts +2 -0
- package/dist/client/types/tools/ozone/moderation/defs.d.ts.map +1 -1
- package/dist/client/types/tools/ozone/moderation/defs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/mocker.d.ts +1 -1
- package/dist/mocker.d.ts.map +1 -1
- package/dist/moderation/decision.d.ts +1 -1
- package/dist/moderation/decision.d.ts.map +1 -1
- package/dist/moderation/decision.js +1 -1
- 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 +3 -3
- package/dist/moderation/index.js.map +1 -1
- package/dist/moderation/subjects/account.d.ts +1 -1
- package/dist/moderation/subjects/account.d.ts.map +1 -1
- package/dist/moderation/subjects/feed-generator.d.ts +1 -1
- package/dist/moderation/subjects/feed-generator.d.ts.map +1 -1
- package/dist/moderation/subjects/notification.d.ts +1 -1
- package/dist/moderation/subjects/notification.d.ts.map +1 -1
- package/dist/moderation/subjects/post.d.ts +1 -1
- package/dist/moderation/subjects/post.d.ts.map +1 -1
- package/dist/moderation/subjects/post.js +1 -1
- package/dist/moderation/subjects/post.js.map +1 -1
- package/dist/moderation/subjects/profile.d.ts +1 -1
- package/dist/moderation/subjects/profile.d.ts.map +1 -1
- package/dist/moderation/subjects/user-list.d.ts +1 -1
- package/dist/moderation/subjects/user-list.d.ts.map +1 -1
- package/dist/moderation/types.d.ts +1 -1
- package/dist/moderation/types.d.ts.map +1 -1
- package/dist/rich-text/rich-text.d.ts.map +1 -1
- package/dist/rich-text/rich-text.js +2 -2
- package/dist/rich-text/rich-text.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/util.d.ts +8 -8
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +7 -10
- package/dist/util.js.map +1 -1
- package/package.json +6 -6
- package/src/agent.ts +59 -9
- package/src/client/lexicons.ts +42 -0
- package/src/client/types/app/bsky/actor/defs.ts +36 -0
- package/src/client/types/app/bsky/feed/postgate.ts +1 -0
- package/src/client/types/app/bsky/feed/threadgate.ts +1 -0
- package/src/client/types/tools/ozone/moderation/defs.ts +2 -0
- package/src/index.ts +3 -3
- package/src/mocker.ts +3 -3
- package/src/moderation/decision.ts +7 -7
- package/src/moderation/index.ts +11 -11
- package/src/moderation/subjects/account.ts +1 -1
- package/src/moderation/subjects/feed-generator.ts +1 -1
- package/src/moderation/subjects/notification.ts +1 -1
- package/src/moderation/subjects/post.ts +5 -5
- package/src/moderation/subjects/profile.ts +1 -1
- package/src/moderation/subjects/user-list.ts +1 -1
- package/src/moderation/types.ts +1 -1
- package/src/moderation/util.ts +1 -1
- package/src/rich-text/detection.ts +1 -1
- package/src/rich-text/rich-text.ts +2 -2
- package/src/types.ts +1 -0
- package/src/util.ts +8 -9
- package/tests/atp-agent.test.ts +179 -1
- package/tests/dispatcher.test.ts +4 -4
- package/tests/errors.test.ts +1 -1
- package/tests/moderation-behaviors.test.ts +3 -3
- package/tests/moderation-custom-labels.test.ts +4 -4
- package/tests/moderation-mutewords.test.ts +0 -1
- package/tests/moderation-prefs.test.ts +16 -0
- package/tests/moderation-quoteposts.test.ts +3 -3
- package/tests/moderation.test.ts +4 -4
- package/tests/rich-text-sanitization.test.ts +1 -1
- package/tests/util/moderation-behavior.ts +2 -2
- package/bench/agent.bench.ts +0 -9
|
@@ -86,6 +86,10 @@ describe('agent', () => {
|
|
|
86
86
|
queuedNudges: [],
|
|
87
87
|
nuxs: [],
|
|
88
88
|
},
|
|
89
|
+
postInteractionSettings: {
|
|
90
|
+
threadgateAllowRules: undefined,
|
|
91
|
+
postgateEmbeddingRules: undefined,
|
|
92
|
+
},
|
|
89
93
|
})
|
|
90
94
|
})
|
|
91
95
|
|
|
@@ -136,6 +140,10 @@ describe('agent', () => {
|
|
|
136
140
|
queuedNudges: [],
|
|
137
141
|
nuxs: [],
|
|
138
142
|
},
|
|
143
|
+
postInteractionSettings: {
|
|
144
|
+
threadgateAllowRules: undefined,
|
|
145
|
+
postgateEmbeddingRules: undefined,
|
|
146
|
+
},
|
|
139
147
|
})
|
|
140
148
|
expect(agent.labelers).toStrictEqual(['did:plc:other'])
|
|
141
149
|
|
|
@@ -171,6 +179,10 @@ describe('agent', () => {
|
|
|
171
179
|
queuedNudges: [],
|
|
172
180
|
nuxs: [],
|
|
173
181
|
},
|
|
182
|
+
postInteractionSettings: {
|
|
183
|
+
threadgateAllowRules: undefined,
|
|
184
|
+
postgateEmbeddingRules: undefined,
|
|
185
|
+
},
|
|
174
186
|
})
|
|
175
187
|
expect(agent.labelers).toStrictEqual([])
|
|
176
188
|
})
|
|
@@ -228,6 +240,10 @@ describe('agent', () => {
|
|
|
228
240
|
queuedNudges: [],
|
|
229
241
|
nuxs: [],
|
|
230
242
|
},
|
|
243
|
+
postInteractionSettings: {
|
|
244
|
+
threadgateAllowRules: undefined,
|
|
245
|
+
postgateEmbeddingRules: undefined,
|
|
246
|
+
},
|
|
231
247
|
})
|
|
232
248
|
})
|
|
233
249
|
|
package/tests/moderation.test.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { ModerationOpts } from '../dist'
|
|
1
2
|
import {
|
|
2
|
-
moderateProfile,
|
|
3
|
-
moderatePost,
|
|
4
|
-
mock,
|
|
5
3
|
interpretLabelValueDefinition,
|
|
4
|
+
mock,
|
|
5
|
+
moderatePost,
|
|
6
|
+
moderateProfile,
|
|
6
7
|
} from '../src'
|
|
7
8
|
import './util/moderation-behavior'
|
|
8
|
-
import { ModerationOpts } from '../dist'
|
|
9
9
|
|
|
10
10
|
describe('Moderation', () => {
|
|
11
11
|
it('Applies self-labels on profiles according to the global preferences', () => {
|
package/bench/agent.bench.ts
DELETED