@atproto/bsky 0.0.6 → 0.0.8

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 (33) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +9 -2
  3. package/dist/auto-moderator/abyss.d.ts +5 -3
  4. package/dist/db/index.js +15 -1
  5. package/dist/db/index.js.map +3 -3
  6. package/dist/db/migrations/20230920T213858047Z-add-tags-to-post.d.ts +3 -0
  7. package/dist/db/migrations/index.d.ts +1 -0
  8. package/dist/db/tables/post.d.ts +1 -0
  9. package/dist/index.js +113 -27
  10. package/dist/index.js.map +3 -3
  11. package/dist/lexicon/lexicons.d.ts +22 -0
  12. package/dist/lexicon/types/app/bsky/feed/post.d.ts +1 -0
  13. package/dist/lexicon/types/app/bsky/richtext/facet.d.ts +7 -1
  14. package/package.json +12 -6
  15. package/src/api/com/atproto/admin/reverseModerationAction.ts +0 -1
  16. package/src/auto-moderator/abyss.ts +20 -12
  17. package/src/auto-moderator/index.ts +40 -5
  18. package/src/db/migrations/20230920T213858047Z-add-tags-to-post.ts +9 -0
  19. package/src/db/migrations/index.ts +1 -0
  20. package/src/db/tables/post.ts +1 -0
  21. package/src/lexicon/lexicons.ts +25 -1
  22. package/src/lexicon/types/app/bsky/feed/post.ts +2 -0
  23. package/src/lexicon/types/app/bsky/richtext/facet.ts +17 -1
  24. package/src/services/actor/views.ts +16 -4
  25. package/src/services/feed/index.ts +1 -0
  26. package/src/services/indexing/plugins/post.ts +3 -0
  27. package/tests/auto-moderator/takedowns.test.ts +2 -1
  28. package/tests/seeds/client.ts +0 -1
  29. package/tests/views/__snapshots__/block-lists.test.ts.snap +0 -1
  30. package/tests/views/actor-likes.test.ts +0 -6
  31. package/tests/views/blocks.test.ts +20 -2
  32. package/tests/views/posts.test.ts +26 -2
  33. package/tests/views/suggested-follows.test.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atproto/bsky
2
2
 
3
+ ## 0.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1637](https://github.com/bluesky-social/atproto/pull/1637) [`d96f7d9b`](https://github.com/bluesky-social/atproto/commit/d96f7d9b84c6fbab9711059c8584a77d892dcedd) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Introduce general support for tags on posts
8
+
9
+ - Updated dependencies [[`d96f7d9b`](https://github.com/bluesky-social/atproto/commit/d96f7d9b84c6fbab9711059c8584a77d892dcedd)]:
10
+ - @atproto/api@0.6.17
11
+
12
+ ## 0.0.7
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`56e2cf89`](https://github.com/bluesky-social/atproto/commit/56e2cf8999f6d7522529a9be8652c47545f82242)]:
17
+ - @atproto/api@0.6.16
18
+
3
19
  ## 0.0.6
4
20
 
5
21
  ### Patch Changes
package/README.md CHANGED
@@ -1,3 +1,10 @@
1
- # Bsky App View
1
+ # @atproto/bsky: Bluesky AppView Service
2
2
 
3
- The Bsky App View. This contains the indexers and XRPC methods for reading data from the Bsky application.
3
+ TypeScript implementation of the `app.bsky` Lexicons backing the https://bsky.app microblogging application.
4
+
5
+ [![NPM](https://img.shields.io/npm/v/@atproto/bsky)](https://www.npmjs.com/package/@atproto/bsky)
6
+ [![Github CI Status](https://github.com/bluesky-social/atproto/actions/workflows/repo.yaml/badge.svg)](https://github.com/bluesky-social/atproto/actions/workflows/repo.yaml)
7
+
8
+ ## License
9
+
10
+ MIT License
@@ -1,8 +1,9 @@
1
1
  import { CID } from 'multiformats/cid';
2
+ import { AtUri } from '@atproto/syntax';
2
3
  import { PrimaryDatabase } from '../db';
3
4
  import { IdResolver } from '@atproto/identity';
4
5
  export interface ImageFlagger {
5
- scanImage(did: string, cid: CID): Promise<string[]>;
6
+ scanImage(did: string, cid: CID, uri: AtUri): Promise<string[]>;
6
7
  }
7
8
  export declare class Abyss implements ImageFlagger {
8
9
  endpoint: string;
@@ -16,11 +17,12 @@ export declare class Abyss implements ImageFlagger {
16
17
  db: PrimaryDatabase;
17
18
  idResolver: IdResolver;
18
19
  });
19
- scanImage(did: string, cid: CID): Promise<string[]>;
20
- makeReq(did: string, cid: CID): Promise<ScannerResp>;
20
+ scanImage(did: string, cid: CID, uri: AtUri): Promise<string[]>;
21
+ makeReq(did: string, cid: CID, uri: AtUri): Promise<ScannerResp>;
21
22
  parseRes(res: ScannerResp): string[];
22
23
  getReqUrl(params: {
23
24
  did: string;
25
+ uri: string;
24
26
  }): string;
25
27
  }
26
28
  declare type ScannerResp = {
package/dist/db/index.js CHANGED
@@ -33429,7 +33429,8 @@ __export(migrations_exports, {
33429
33429
  _20230817T195936007Z: () => T195936007Z_native_notifications_exports,
33430
33430
  _20230830T205507322Z: () => T205507322Z_suggested_feeds_exports,
33431
33431
  _20230904T211011773Z: () => T211011773Z_block_lists_exports,
33432
- _20230906T222220386Z: () => T222220386Z_thread_gating_exports
33432
+ _20230906T222220386Z: () => T222220386Z_thread_gating_exports,
33433
+ _20230920T213858047Z: () => T213858047Z_add_tags_to_post_exports
33433
33434
  });
33434
33435
 
33435
33436
  // src/db/migrations/20230309T045948368Z-init.ts
@@ -33894,6 +33895,19 @@ async function down26(db) {
33894
33895
  await db.schema.alterTable("post").dropColumn("violatesThreadGate").execute();
33895
33896
  }
33896
33897
 
33898
+ // src/db/migrations/20230920T213858047Z-add-tags-to-post.ts
33899
+ var T213858047Z_add_tags_to_post_exports = {};
33900
+ __export(T213858047Z_add_tags_to_post_exports, {
33901
+ down: () => down27,
33902
+ up: () => up27
33903
+ });
33904
+ async function up27(db) {
33905
+ await db.schema.alterTable("post").addColumn("tags", "jsonb").execute();
33906
+ }
33907
+ async function down27(db) {
33908
+ await db.schema.alterTable("post").dropColumn("tags").execute();
33909
+ }
33910
+
33897
33911
  // src/db/migrations/provider.ts
33898
33912
  var CtxMigrationProvider = class {
33899
33913
  constructor(migrations, ctx) {