@atproto/api 0.6.19 → 0.6.21
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 +26 -0
- package/README.md +4 -0
- package/definitions/moderation-behaviors.d.ts +1 -0
- package/definitions/profile-moderation-behaviors.json +25 -0
- package/dist/agent.d.ts +2 -0
- package/dist/bsky-agent.d.ts +7 -0
- package/dist/client/index.d.ts +15 -0
- package/dist/client/lexicons.d.ts +142 -0
- package/dist/client/types/app/bsky/actor/defs.d.ts +1 -0
- package/dist/client/types/com/atproto/server/confirmEmail.d.ts +30 -0
- package/dist/client/types/com/atproto/server/createAccount.d.ts +2 -0
- package/dist/client/types/com/atproto/server/createSession.d.ts +2 -0
- package/dist/client/types/com/atproto/server/getSession.d.ts +1 -0
- package/dist/client/types/com/atproto/server/refreshSession.d.ts +1 -0
- package/dist/client/types/com/atproto/server/requestEmailConfirmation.d.ts +13 -0
- package/dist/client/types/com/atproto/server/requestEmailUpdate.d.ts +18 -0
- package/dist/client/types/com/atproto/server/reserveSigningKey.d.ts +18 -0
- package/dist/client/types/com/atproto/server/updateEmail.d.ts +27 -0
- package/dist/client/types/com/atproto/sync/listRepos.d.ts +1 -0
- package/dist/index.js +754 -321
- package/dist/index.js.map +3 -3
- package/dist/moderation/accumulator.d.ts +1 -0
- package/dist/types.d.ts +1 -0
- package/docs/moderation-behaviors/profiles.md +17 -0
- package/package.json +8 -7
- package/src/agent.ts +32 -1
- package/src/bsky-agent.ts +43 -0
- package/src/client/index.ts +65 -0
- package/src/client/lexicons.ts +166 -1
- package/src/client/types/app/bsky/actor/defs.ts +1 -0
- package/src/client/types/com/atproto/server/confirmEmail.ts +61 -0
- package/src/client/types/com/atproto/server/createAccount.ts +2 -0
- package/src/client/types/com/atproto/server/createSession.ts +2 -0
- package/src/client/types/com/atproto/server/getSession.ts +1 -0
- package/src/client/types/com/atproto/server/refreshSession.ts +1 -0
- package/src/client/types/com/atproto/server/requestEmailConfirmation.ts +28 -0
- package/src/client/types/com/atproto/server/requestEmailUpdate.ts +34 -0
- package/src/client/types/com/atproto/server/reserveSigningKey.ts +35 -0
- package/src/client/types/com/atproto/server/updateEmail.ts +55 -0
- package/src/client/types/com/atproto/sync/listRepos.ts +1 -0
- package/src/moderation/accumulator.ts +13 -0
- package/src/moderation/subjects/account.ts +7 -1
- package/src/types.ts +1 -0
- package/tests/agent.test.ts +27 -21
- package/tests/bsky-agent.test.ts +19 -25
- package/tests/errors.test.ts +5 -11
- package/tests/rich-text-detection.test.ts +3 -3
- package/tests/util/index.ts +3 -0
- package/tests/util/moderation-behavior.ts +10 -2
|
@@ -25,6 +25,10 @@ expect.extend({
|
|
|
25
25
|
if (actual.cause.source.type === 'list') {
|
|
26
26
|
cause = 'muted-by-list'
|
|
27
27
|
}
|
|
28
|
+
} else if (actual.cause?.type === 'blocking') {
|
|
29
|
+
if (actual.cause.source.type === 'list') {
|
|
30
|
+
cause = 'blocking-by-list'
|
|
31
|
+
}
|
|
28
32
|
}
|
|
29
33
|
if (!expected) {
|
|
30
34
|
if (!ignoreCause && actual.cause) {
|
|
@@ -153,8 +157,12 @@ export class ModerationBehaviorSuiteRunner {
|
|
|
153
157
|
? m.listViewBasic({ name: 'Fake List' })
|
|
154
158
|
: undefined,
|
|
155
159
|
blockedBy: def.blockedBy,
|
|
156
|
-
blocking:
|
|
157
|
-
|
|
160
|
+
blocking:
|
|
161
|
+
def.blocking || def.blockingByList
|
|
162
|
+
? 'at://did:web:self.test/app.bsky.graph.block/fake'
|
|
163
|
+
: undefined,
|
|
164
|
+
blockingByList: def.blockingByList
|
|
165
|
+
? m.listViewBasic({ name: 'Fake List' })
|
|
158
166
|
: undefined,
|
|
159
167
|
}),
|
|
160
168
|
})
|