315 Commits

Author SHA1 Message Date
Ian Wesley-Smith
e277158f70
Add recId to getSuggestionsSkeleton (#3364)
* Add recId to getSuggestionsSkeleton

* codegen

* add recId to app client endpoints

* codegen

* changeset

---------

Co-authored-by: Hailey <me@haileyok.com>
2025-01-13 15:34:11 -08:00
Foysal Ahamed
53621f8e10
Add a policy property to takedown events (#3271)
*  Add a policy property to takedown events

*  Add policy list setting validation

*  Make multiple policies possible for takedown and event search

* 📝 Add changeset

*  Use , as policies separator
2025-01-02 20:46:53 -05:00
Foysal Ahamed
d90d999def
🐛 Fix tags length (#3294)
* 🐛 Allow tag item longer than 25 char

* 📝 Add changeset
2024-12-27 16:48:58 +00:00
Foysal Ahamed
9ea2cce9a4
Apply queue filter on database query when fetching subjects (#3280)
*  Apply queue filter on database query when fetching subjects

*  Add queue seed option

* 📝 Add changeset

* 🐛 Allow 0 value for queueIndex
2024-12-23 13:08:31 +00:00
Foysal Ahamed
6d308b857b
Allow appeals on takendown account (#3251)
*  Allow appeals on takendown account

*  Update snapshot

*  Remove duplicate test

*  Respond with takendown token from createSession for takendown accounts

* 🧹 cleanup appeal account action stuff

* 📝 Add description to new field

* ♻️ Refactor authscope formatter and add test for create record with takendown token

*  Update snapshot

* add createReport route

* changeset

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2024-12-20 13:52:20 -06:00
Foysal Ahamed
6a3e781b98
Add && separator for tags filter param on queryStatuses endpoint (#3261)
*  Add && separator for tags filter param on queryStatuses endpoint

* 🐛 Handle potential empty tag search input

* 🐛 Handle empty condition
2024-12-18 22:46:05 +00:00
Hailey
dced566de5
add trending topic lex, wire in agent (#3250)
* add lex

* add suggested as well

* don't use uri format

* codegen

* tweak lex

* wire in

* add missing var

* move

* make auth optional

* mount

* add trending topics to server cfg (#3226)

* add trending topics to server cfg

* rename stuff

* remove langs

* make viewer nullable

* recodegen

* changeset again

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2024-12-16 15:20:46 -08:00
dan
207728d2b3
Add reasons param to listNotifications (#3222)
* Add filter param to listNotifications

* Codegen

* Changeset

* update schemas

* tweak schema

* filter -> reasons

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2024-12-11 13:46:14 -06:00
Foysal Ahamed
ed22362209
Optionally ack all open subjects from the author with acknowledge event (#3171)
*  Acknowledge all open subjects of an account when acknowledging account level reports

* 📝 Add changeset
2024-12-05 11:45:28 +00:00
Foysal Ahamed
c72145dbeb
Allow querying events by multiple keywords using OR condition (#3070)
*  Allow querying events by multiple keywords using OR condition

* 📝 Update comment

*  Update operator to ||

*  Fix test

* 🐛 Handle edge cases around search query

*  Codgen
2024-11-29 18:00:48 +00:00
dan
a3ce23c4cc
Add hotness as a default thread sort option (#3082)
* Add hotness as a thread sorting option

* Changeset
2024-11-22 18:36:55 -08:00
rafael
2e7aa211d2
addReservedHandle lexicon (#3056)
* addReservedHandle lexicon

* addReservedHandle codegen

* changeset

* Add empty object output

* Empty object output codegen
2024-11-21 14:40:45 -03:00
rafael
a4b528e5f5
Add searchStarterPacks to appview (#2978)
* Add app.bsky.graph.searchStarterPacks lexicon

* Codegen for app.bsky.graph.searchStarterPacks

* Add app.bsky.unspecced.searchStarterPacksSkeleton

* Gen app.bsky.unspecced.searchStarterPacksSkeleton

* Add SearchStarterPacks rpc to bsky.proto

* Implement searchStarterPacks endpoint

* @atproto/api changeset

* Add starter pack search by term to dataplane
2024-11-18 10:36:39 -03:00
Foysal Ahamed
48d08a469f
🐛 Define durationInHours as optional for reporter mute for permanent mutes (#2988)
* 🐛 Define durationInHours as optional for reporter mute for permanent mutes

* 📝 Add changeset
2024-11-13 21:11:16 +01:00
Samuel Newman
c6a9678280 Revert "lexicon change - add presentation"
This reverts commit 4084f6091a69fde86172eae9fd562ae4bb58fbae.
2024-11-08 14:57:46 +00:00
Samuel Newman
4084f6091a lexicon change - add presentation 2024-11-08 13:29:36 +00:00
rafael
561431fe48
Add opened to chat.bsky.convo.defs#convoView (#2953)
* Add convoView to chat.bsky.convo.defs#convoView

* Add changeset
2024-11-08 08:53:05 -03:00
bnewbold
cdc0bbf389
com.atproto lexicions: longer rkey length (#2949)
* bump lexicon rkey limits to match specs

* codegen
2024-11-07 19:23:25 -08:00
Foysal Ahamed
d6f33b4742
Add events for account and record update/delete/deactivation (#2661)
*  Add events for account and record update/delete/deactivation

*  Add handle change event

*  Reduce account events to 2 types and record events to 1

*  Store metadata from account, identity and record events

*  Add created event for record

*  Add ndd the new events to allowed types in emitEvent

*  Use string value for record op and add tombstone flag to identity event

*  Add active flag on account events

*  Change accountStatus -> status to match with firehose event

*  Make active flag required

* 🚨 fix prettier style issue

*  Track record/account delete and update data in subject status (#2804)

*  Store deleted/updated event data in subject_status

* 🐛 Fix query for recordDeletedAt and recordUpdatedAt

*  Add tombstoned status

*  Move from record to hosting term

*  Add tests for hosting params

*  Update lexicons for hostingStatuses

*  Update snapshots

*  Update snapshots

*  Update snapshots

*  Adjust hosting statuses

* 📝 Add changeset
2024-11-07 22:51:44 +01:00
Foysal Ahamed
c4b5e53957
Ozone instance-wide and user-specific settings (#2905)
*  Settings endpoints are working

* 🧹 Rename file

*  Replace ad-hoc manage roles to match team member roles

* ♻️ Refactor role names

*  Polish up

*  Move to using id for pagination

* 📝 Add changeset

*  Update snapshots

*  Change column order in setting table index and add did in all queries
2024-11-07 22:43:30 +01:00
Daniel Holmgren
73f40e63ab
Add threat signatures to ozone repo views (#2931)
* add threat signatures to ozone repo views

* explicitly add to views
2024-10-30 18:30:41 -05:00
devin ivy
209238769c
Add app.bsky.unspecced.getConfig endpoint (#2918)
* lexicon: add app.bsky.unspecced.getConfig for client runtime config

* bsky: add app.bsky.unspecced.getConfig w/ new env for checkEmailConfirmed

* changeset
2024-10-30 19:09:54 -04:00
Daniel Holmgren
0158ab3845
Add threat signatures to admin view (#2929)
* add threat signatures to admin view

* codegne
2024-10-30 18:01:12 -05:00
Foysal Ahamed
19e36afb2c
Add collection and subjectType filters to queryEvents and queryStatuses (#2914)
*  Add collection and subjectType filters to queryEvents and queryStatuses

* 📝 Add changeset

* ♻️ Refactor or query builder
2024-10-30 16:20:38 +01:00
Foysal Ahamed
22d039a229
Ozone sets (#2636)
*  Initial implementation of sets api on ozone

*  Introduce sortDirection to querySets

* 🧹 Cleanup and refactor

*  Align setView for response

* ♻️ Rename and add specific error

* 🐛 Cleanup unnecessary check that is covered by lexicon

*  Rename remove to delete and add set suffix

*  Use id and createdAt for values pagination

*  Add index on createdAt for query perf and other cleanups

* 🐛 Set createdAt when inserting values

* 📝 Add changeset

*  Add index on setId and createdAt
2024-10-08 19:16:09 +02:00
Daniel Holmgren
df14df522b
Ozone signature methods (#2855)
* lexicons

* fix typo & add proxy routes

* changeset
2024-10-03 14:00:12 -05:00
Foysal Ahamed
a2bad977a8
Ozone batch repo and record getters (#2836)
*  Add getRepos and getRecords endpoints for bulk fetching

*  Fix issues and add tests for get repos and get records

*  Use the right lxm

* 🐛 Revert changes in lockfile

*  Add getAccountInfos in PDS

* 🐛 Fix type def for repo and record view detail

*  Update snapshots

*  Update snapshots

*  Consolidate error type for com.atproto and tools.ozone getRecord error type

* 🧹 Cleanup

*  Update snapshots

*  Update snapshots

*  Changeset
2024-10-01 19:37:23 +02:00
Samuel Newman
2676206e42
Pinned posts (#2771)
* pinned posts lexicon

* codegen

* change lexicon, different approach

* codegen 2

* dataplane db migration

* move pinned post lexicon to right place

* add pinned posts optionally to getAuthorFeed

* remove type modification

* Clarify naming, add viewer state, add tests

* return pinnedPost with profileViewDetailed

* allow pinned replies in `posts_and_author_threads`

* clearer variable naming

* annotate type of `items`

* boolean --> varchar

* reuse authorDid in viewerPinned

* simplify test

* make pinned post not top post in test

* update snapshot

* changeset

---------

Co-authored-by: Eric Bailey <git@esb.lol>
Co-authored-by: dholms <dtholmgren@gmail.com>
2024-09-26 18:26:45 -05:00
Eric Bailey
319aa7cf6d
Add isFallback to getSuggestedFollowsByActor method (#2805)
* Add isFallback to `getSuggestedFollowsByActor`

Inferred based on returned `relativeToDid` from the suggestions
response.

* Integrate new params

* Fix logic
2024-09-13 12:37:15 -05:00
Eric Bailey
33aa0c7222
NUX API (#2810)
* Codegen

* Explicitly add Zod (already a peer dep) and validation to api

* Add Nux methods

* Match naming convention

* Remove id, it won't be used

* Add tests

* Use id instead of name, little clearer

* Update API contracts

* Update tests

* Changeset

* Don't mutate
2024-09-11 18:25:05 -05:00
Foysal Ahamed
62a8225f36
Optionally ack all open subjects from the author with takedown event and get all mod subjects of a user (#2793)
*  Add acknowledgeAllSubjectsOfAccount flag with takedown event

* 📝 better documentation of forAccount and subject params

* 🧹 Cleanup tests

*  Change wording according to review

*  Refactor tests

* ♻️ Rename acknowledge flag
2024-09-11 18:26:53 +02:00
Foysal Ahamed
e4d41d66fa
❇️ Template language (#2780)
*  Throw specific error for duplicate template name

* 🧹 Cleanup console

*  Throw duplicate template name error from update too

*  Add language to templates

* 📝 Add changeset

*  Add missing event type

*  Add language format in lexicon and error checker in util

* 🚨 fix linter issues
2024-09-04 12:42:39 +02:00
Daniel Holmgren
bfbac24312
Repo write commit metadata (#2745)
* schemas & codegen

* impl

* bundle commit & rev
2024-08-30 13:18:43 -05:00
devin ivy
befebc0e98
Revise repo write validation for unknown Lexicons (#2748)
* lexicon: validation status result from repo writes

* pds: return  validation status from repo writes, write results from applyWrites

* tidy
2024-08-30 12:59:55 -05:00
devin ivy
80ada8f476
Video lexicons and appview views (#2751)
* lexicon: initial lexicons for video embeds in bsky app

* lexicon: fix video caption file size limit

* codegen

* appview: stub out video embed view logic

* api prerelease

* api prerelease

* lexicon: video upload/processing lexicons

* tidy

* lexicon: app.bsky.video lexicons for uploads

* codegen

* api prerelease

* appview: present video embeds on posts

* appview: snaps

* changeset

* appview: fix wiring of video url config
2024-08-28 19:03:35 -04:00
Eric Bailey
a8e1f9000d
Return ThreadgateView on response from getPostThread (#2737)
* Return `ThreadgateView` on response from `getPostThread`

* Changeset

* Format

* Add to test

* Clean up logic

* Use suggestion from Dan
2024-08-22 17:00:01 -05:00
Hailey
4ab2483547
Add quoteCount to embed view (#2735)
Co-authored-by: devin ivy <devinivy@gmail.com>
2024-08-22 09:49:06 -07:00
Eric Bailey
aba664fbdf
Detached QPs and hidden replies (#2675)
* Add new postgate lex, hiddeReplies to threadgate, codegen

* Add protobufs

* Add to mock dataplane

* Add matching postgate method to feed hydration methods

* Add to getRecord

* Add to HydrationState

* Fix typo

* Add to mergeStates, fetch embeds in threads

* Integrate into embed views

* Add test for QPs in threads

* Add feed test

* Fix naming convention in protos

* Add #viewRemoved record view, rename postgate.json

* Integrate new view

* Filter hidden replies from feeds

* Filter out replies at the handler level, do not filter for author feeds

* Fix lint

* Move hidden reply check to view layer

* Reduce, reuse, recycle

* Rename to lowercase

* Rename layer vars

* Add quote gate props to postgate (#2693)

* Add quote gate props to postgate

* Consistent naming

* Fix record structure

* Codegen

* Show hidden replies in author feed

* Allow reposts of hidden replies

* Lex and codegen

* Add violates_quote_gate to proto

* Consistent naming, codegen

* Integrate violatesQuotegate and canQuotepost

* Remove rules, codegen

* Hydrate all postgates for all requested posts

* Match other impl

* Add test, need to split these out

* Format

* Hydrate first nested embeds too

* Add postgate test suite

* Add violatesQuoteGate to dataplane

* Ingest and set violatesQuoteGate, return on meta

* Return removed embed for quotes that violate gate

* Add test

* Dedupe URIs before fetching postgates

* Update snaps

* Snap

* Format

* Updating naming conventions for postgate-related attributes

* Correct naming

* Consistency

* Proto too

* Rename to viewDetached

* Codegen

* Rename everything

* Codegen

* Quotes that violate a quote gate can still be quoted themselves

* Couple more renames

* Snaps

* Ensure reply ref is tombstoned for hidden replies

* Split out hidden replies tests and create fresh fixture

* Hydrate threadgates for reply notifications, filter hidden replies

* Remove snap

* Add flaky test

* Rename violatesEmbeddingRules

* Fix flaky test

* Only write to db if violatesEmbeddingRules is true

* DRY up post uri -> gate uri logic

* isThreadgateListRule

* Don't share users object between tests

* No pascal

* Remove default params

* Find -> some

* canQuotepost -> canEmbed, remove optional

* Fix quoteee typo

* await follows

* Throw in post uri -> gate utils

* Ensure fetch threadgates for reply roots

* Don't hydrate threadgates twice

* DRY up uri -> did parsing

* Clean up parsePostgate logic

* Format

* Revert change

* Revert change

* Replace a couple more uri->did conversions

* Only filter replies from feeds if viewer hid them

* Revert, filter out replies that are hidden from feeds

* Remove old test

* Replace uri->did util

* Revert change to unused file

* Only validatePostEmbed and check postgates for post records

* Ensure notifications aren't generated down a hidden reply chain

* Changeset

* Cleanup

* Fix notification filtering logic

* Simplify

* Don't notify for invalid embeds

* Use new APIs

* Add hasPostGate and hasThreadGate flags from dataplane

* Only fetch postgates if post has one

* Only fetch threadgates if post has one or was deleted

* Remove notification filtering

* Don't hydrate threadgates for notifications

* Move hidden replies in feeds to match block handling

* Do no filtering of hidden replies in feeds

* Revert "Don't hydrate threadgates for notifications"

This reverts commit 1dcec0b239a7b9d6800427b26b8ba3e6a54210f9.

* Revert "Remove notification filtering"

This reverts commit 1e7069dfd809d1f18e9f05fd1d422e7399aa1bb0.

* Filter notifications for OP only

* Add additional check to hidden replies test

* Move noty filter logic into method handler

* Update .changeset/perfect-parrots-appear.md

Co-authored-by: devin ivy <devinivy@gmail.com>

* Update packages/bsky/tests/seed/postgates.ts

Co-authored-by: devin ivy <devinivy@gmail.com>

* Another structuredClone

* Update packages/bsky/src/hydration/hydrator.ts

Co-authored-by: devin ivy <devinivy@gmail.com>

* Better comment

* Update packages/bsky/src/data-plane/server/indexing/plugins/post.ts

Co-authored-by: devin ivy <devinivy@gmail.com>

* Regen protos to match dataplane

* Update quotes snap to include embeddingDisabled

* Clarify usage of post uri -> gate utils

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2024-08-21 14:36:51 -05:00
Hailey
2a0c088cc5
quote aggs, list quotes (#2658)
* add quote count to post_agg, add getPostQuotes

rework schema

rework schema

add getPostQuotes to api

use posts

use posts

codegen

use items instead of quotes

codegen

add getPostQuotes

add quoteCount to response

update lexicon for postview

increment post ags

add quote to post aggs

add quote interface

oops

add quote table migration

* update

* bufgen

* update params

* update to use v2

* logs

* rm comment

* pass cursor

* add index

* Update packages/bsky/src/data-plane/server/db/migrations/20240723T220703655Z-quotes.ts

Co-authored-by: devin ivy <devinivy@gmail.com>

* only if its a post

* tests

* Discard changes to packages/bsky/tests/views/posts.test.ts

* fix client call

* Include new quotes agg in test expectation

* Use new API for headers

* Update packages/bsky/src/data-plane/server/indexing/plugins/post.ts

Co-authored-by: devin ivy <devinivy@gmail.com>

* revert rm

* rm timeout

* cursor test

* Changeset

* Remove pds specific bump

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
Co-authored-by: Eric Bailey <git@esb.lol>
2024-08-21 12:33:05 -05:00
Shoshána Abigail
2c65cb9eb3
Fix getActorLikes documentation to reflect auth required (#2593)
You can only view your own likes and this fixes the documentation to note that auth is required and that the actor must be the requesting account

https://github.com/bluesky-social/atproto/pull/1440#issuecomment-1700193127
2024-08-17 13:06:39 -04:00
Daniel Holmgren
dc471da267
Service auth method binding - PDS (#2668)
* pds changes only

* use scope for ozone service profile

* dont verify scopes on pds yet

* tidy

* tidy imports

* changeset

* add tests

* another changeset

* scope -> lxm

* tidy

* update nonce size

* pr feedback

* trim trailing slash

* nonce -> jti

* fix xrpc-server test

* allow service auth on uploadBlob
2024-08-05 15:09:50 -05:00
bnewbold
a95a902bba
minor typos in descriptions and comments (#2681)
* lex: typos in descriptions

* more minor typos

* codegen lexicon typos

* more comment typos
2024-08-05 09:49:25 -07:00
Eric Bailey
951a3df15a
Remove detach (#2676)
* Remove detach record

* Changeset
2024-08-02 15:19:29 -05:00
Eric Bailey
ff803fd2bf
[Detach] Lexicons (#2664)
* Define new detach record

* Codegen

* Add limit of 1k

* Codegen

* add protos

* tweak schema

* Add changeset

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2024-07-31 16:45:20 -05:00
Eric Bailey
77c5306d2a
Update muted words handling, add attributes (#2276)
* Sketch proposal for additional muted words attributes

* Rename ttl -> expiresAt

* Feedback

* Codegen

* Refactor muted words methods to integrate new attributes

* Add changeset

* Use datetime format

* Simplify migration

* Fix tests

* Format

* Re-integrate tests

* Let the lock cook

* Fix comments

* Integrate mute words enhancements (#2643)

* Check expiry when comparing mute words

* Check actors when comparing

* Tweak lex, condegen

* Integrate new prop

* Remove fake timers

(cherry picked from commit ad31910560ce938e3ff64944d46355c64635ebf8)

* Update changeset

* Prevent deleting value when updating

* Include missing test

* Add default

* Apply default 'all' value to existing mute words to satisfy Typescript

* Fix types in tests

* Fix types on new tests
2024-07-31 16:22:19 -05:00
Daniel Holmgren
76c91f8325
Priority notification setting (#2648)
* priority notif settings in bsync

* lint

* priority notifications lexicon update

* codegen

* putNotificationPreferences -> putPreferences

* bsync: reorg around notif "priority", fix build, add validation & tests

* bsync: notif channel fix, tests fix

* bsky: update protos for priority notifs

* api prerelease

* add priority notif to actor state table

* dataplane impl

* appview: wire-up notif priority params

* appview: notif priority tests

* dataplane impl

* fix up tests

* tidy

* add changeset

---------

Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
Co-authored-by: Devin Ivy <devinivy@gmail.com>
2024-07-23 12:33:01 -07:00
Eric Bailey
8f22a2521c
Update data source for getSuggestedFollowsByActor (#2630)
* Update lex

* Codegen

* Set up StatSig

* Integrate new implementation into old endpoint

* Add todo to crypto module

* Format

* Specify StatSig env

* Downgrade pnpm to match CI, bump lock

* Catch StatSig errors

* Use sep env

* Reset lockfile

* Re-add new dep using correct pnpm version

* tidy

* Integrate into AppContext and lifecycle

* Use camelCase

* Switcheroo

Co-authored-by: devin ivy <devinivy@gmail.com>

* Init prior to server listen start

* Move test env check up to server config

* Add logger and log

* Better comment

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2024-07-11 17:14:54 -04:00
bnewbold
aab465deb7
lexicons: add missing ozone Tag event type to unions (#2632)
* lex: add missing tag events to unions

* make codegen
2024-07-08 18:54:27 -07:00
Hailey
ed58101790
Add starter packs to post hydration (#2613)
* add hydration state

* add view to post

* oops. `graph.defs` not `starterpack.defs`

* add tests, update snapshots

* update record lexicon

* codegen

* add changeset

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2024-07-02 17:52:28 -04:00
Yoshihiro Sugi
0529bec991
Add labelersPref to getPreferences union return types (#2554)
* Add missing getPreferences union types

* Add changeset
2024-07-02 09:40:52 -07:00