@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.
Files changed (49) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +4 -0
  3. package/definitions/moderation-behaviors.d.ts +1 -0
  4. package/definitions/profile-moderation-behaviors.json +25 -0
  5. package/dist/agent.d.ts +2 -0
  6. package/dist/bsky-agent.d.ts +7 -0
  7. package/dist/client/index.d.ts +15 -0
  8. package/dist/client/lexicons.d.ts +142 -0
  9. package/dist/client/types/app/bsky/actor/defs.d.ts +1 -0
  10. package/dist/client/types/com/atproto/server/confirmEmail.d.ts +30 -0
  11. package/dist/client/types/com/atproto/server/createAccount.d.ts +2 -0
  12. package/dist/client/types/com/atproto/server/createSession.d.ts +2 -0
  13. package/dist/client/types/com/atproto/server/getSession.d.ts +1 -0
  14. package/dist/client/types/com/atproto/server/refreshSession.d.ts +1 -0
  15. package/dist/client/types/com/atproto/server/requestEmailConfirmation.d.ts +13 -0
  16. package/dist/client/types/com/atproto/server/requestEmailUpdate.d.ts +18 -0
  17. package/dist/client/types/com/atproto/server/reserveSigningKey.d.ts +18 -0
  18. package/dist/client/types/com/atproto/server/updateEmail.d.ts +27 -0
  19. package/dist/client/types/com/atproto/sync/listRepos.d.ts +1 -0
  20. package/dist/index.js +754 -321
  21. package/dist/index.js.map +3 -3
  22. package/dist/moderation/accumulator.d.ts +1 -0
  23. package/dist/types.d.ts +1 -0
  24. package/docs/moderation-behaviors/profiles.md +17 -0
  25. package/package.json +8 -7
  26. package/src/agent.ts +32 -1
  27. package/src/bsky-agent.ts +43 -0
  28. package/src/client/index.ts +65 -0
  29. package/src/client/lexicons.ts +166 -1
  30. package/src/client/types/app/bsky/actor/defs.ts +1 -0
  31. package/src/client/types/com/atproto/server/confirmEmail.ts +61 -0
  32. package/src/client/types/com/atproto/server/createAccount.ts +2 -0
  33. package/src/client/types/com/atproto/server/createSession.ts +2 -0
  34. package/src/client/types/com/atproto/server/getSession.ts +1 -0
  35. package/src/client/types/com/atproto/server/refreshSession.ts +1 -0
  36. package/src/client/types/com/atproto/server/requestEmailConfirmation.ts +28 -0
  37. package/src/client/types/com/atproto/server/requestEmailUpdate.ts +34 -0
  38. package/src/client/types/com/atproto/server/reserveSigningKey.ts +35 -0
  39. package/src/client/types/com/atproto/server/updateEmail.ts +55 -0
  40. package/src/client/types/com/atproto/sync/listRepos.ts +1 -0
  41. package/src/moderation/accumulator.ts +13 -0
  42. package/src/moderation/subjects/account.ts +7 -1
  43. package/src/types.ts +1 -0
  44. package/tests/agent.test.ts +27 -21
  45. package/tests/bsky-agent.test.ts +19 -25
  46. package/tests/errors.test.ts +5 -11
  47. package/tests/rich-text-detection.test.ts +3 -3
  48. package/tests/util/index.ts +3 -0
  49. 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: def.blocking
157
- ? 'at://did:web:self.test/app.bsky.graph.block/fake'
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
  })