559 Commits

Author SHA1 Message Date
Foysal Ahamed
b9ca76f012
Allow searching reports by moderator did (#1283)
*  Allow searching reports by moderator did

*  Remove .only flags on tests

*  Update snapshot

*  Add checks for did match in actions
2023-07-14 16:05:56 -07:00
Ansh
08dc2b725d
Pagination on getPopularFeedGenerators (#1293)
* add temporary page-based pagination

* use cursor & limit for pagination

* tests

* add to appview

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2023-07-07 13:49:02 -05:00
Daniel Holmgren
7e0201d4d6
Bump package versions (#1288)
* v0.3.0

* bump common-web to 0.2.0

* v0.2.0

* v0.2.0

* v0.1.0

* v0.1.0

* v0.1.0

* v0.2.0

* v0.4.0

* v0.1.0

* v0.2.0

* v0.2.0

* v0.3.0

* v0.2.0
2023-07-05 20:54:26 -05:00
Daniel Holmgren
e7a0d27f1f
Proxy timeline skeleton construction (#1264)
proxy timeline skeleton construction to appview
2023-07-03 11:28:39 -05:00
Devin Ivy
e522ece8f3 v0.3.13 2023-06-23 16:41:27 -04:00
Ansh
0306f81d37
Add ability to embed lists (#1188)
* add cid to ListView and ListViewBasic

* add test for mute list embed

* add support for list embeds views

* test

* port to appview

* update missing snap

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2023-06-23 16:30:52 -04:00
devin ivy
3da0324873
Post record language tagging, lexicon language format (#1219)
* Add languages field to post record

* helper for parsing bcp47

* add language format to lexicon

* codegen for post record langs field

* re-export language parsing in api package

* tests and tidy for lexicon language format

* index post langs, in-progress

* update snapshots, fixes record-with-media embed issue

* index post langs on bsky appview

* don't bother indexing post langs in pds appview, tidy
2023-06-23 16:23:16 -04:00
Daniel Holmgren
2768fb9e45
Make requestCrawl & notifyOfUpdate procedures (#1217)
make requestCrawl & notifyOfUpdate procedures
2023-06-20 09:36:09 -05:00
devin ivy
84032a6c77
Bsky appview: resolve long transactions, tombstone behavior (#1192)
* Loosen indexing txn boundaries to record-level in bsky appview, no long transactions

* Add explicit HeadNotFound error to sync.getHead

* Update tombstone behavior on bsky appview, use more specific error on sync.getHead
2023-06-12 17:51:38 -04:00
devin ivy
5951d9347f
Misc. syncing-up bsky appview with on-pds appview (pt. 2) (#1190)
* Misc notification and optimization in bsky, tidy

* Handle notifs on message queue in bsky appview

* Sync-up profile labeling behavior in bsky

* No async work during actor unindexing in bsky, include additional indexes

* Prevent deeply nested notifs w/ hellthread exception in bsky appview

* Add indexes to bsky appview for more efficient actor deletion/unindexing

* Update pds proxy snaps for updated bsky profile labeling

* Return custom suggestions in bsky appview

* Test out-of-order indexing of aggregations on bsky appview

* Proxy pds getPopular to hot-classic feed on appview. Proxy getPopularFeedGenerators to appview.

* Make did field required on feedgen view
2023-06-11 15:48:20 -04:00
Devin Ivy
1033eddc00 v0.3.12 2023-06-09 09:28:32 -04:00
Foysal Ahamed
8857fb0845
Filter reports by reporter did (#1165)
*  Hydrate subject author's repo in moderation reports

*  Allow filtering moderation reports by reporter DIDs

* 🚧 Expose only handle of the subject repo on moderation reports

* 🚧 Regenerate lexicons off main

* 🧹 Cleanup unnecessary joins

*  Updating snapshots

*  Make handle optional to allow serving reports even if handle doesn't exist

*  Port over subjectHandle implementation to bsky package

*  Port over filter by reporter implementation to bsky package

* Simplify query builder

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

* Simplify query builder

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

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2023-06-09 09:21:09 -04:00
Devin Ivy
5eb777c3f2 v0.3.11 2023-06-08 10:32:52 -04:00
Foysal Ahamed
9a2dc7119e
Hydrate subject author's repo in moderation reports (#1135)
*  Hydrate subject author's repo in moderation reports

* 🚧 Expose only handle of the subject repo on moderation reports

* 🚧 Regenerate lexicons off main

* 🧹 Cleanup unnecessary joins

*  Updating snapshots

*  Make handle optional to allow serving reports even if handle doesn't exist

*  Port over subjectHandle implementation to bsky package
2023-06-08 10:17:52 -04:00
Daniel Holmgren
6fb9a8faea
Fix dropped events in sync.subscribeRepos (#1167)
* wip

* first pass done

* chnage around how channels function

* bugfixing

* fix up migration & tests

* fix dev-env

* add prep migration for stream fixing

* application code changes to use new repo_event table

* dont send evts

* add outgoing_repo_seq table + sqlite migrations

* patch up down migration

* patching up a couple things

* update test

* patchup

* re-enable subscription route

* add outgoingSeq column

* updating

* accidental add

* temporarily disable stream

* resolve merge conflict

* add migration

* migration for seq

* fix test

* id -> seq

* get schema lock ids

* tidy

* fix server test

* fix up

* use bsky uniqueLockId approach

* tidy

* gh actions build

* build branch

* build branch

* tweak test

* rm constraint rename

* small bugfix

* check for seq not null

* fix up issues

* one more small change

* tidy

* no build branches
2023-06-06 19:18:44 -05:00
Devin Ivy
85765852b5 v0.3.10 2023-05-30 12:18:36 -04:00
Foysal Ahamed
4a6c9764e3
Allow reverting chronological order of moderation reports (#1113)
*  Allow reverting chronological order of moderation reports

*  Port over report sorting to bsky package
2023-05-30 11:50:46 -04:00
Daniel Holmgren
39cde47c11
Admin rebases (#1112)
add admin route for kicking off rebases
2023-05-29 12:42:39 -05:00
Devin Ivy
e0d3c58113 v0.3.9 2023-05-29 00:54:16 -04:00
Foysal Ahamed
3414fcedbf
Allow ignoring moderation reports by subject (#1091)
*  Allow ignoring moderation reports by subject

* 🔧 Remove unwanted package.json change

*  Remove subject format specifier

*  Port over ignore subject implementation to bsky package

* Revert " Port over ignore subject implementation to bsky package"

This reverts commit 3c782c1805548d1ebdbbd08b68b6e92ac97fdee5.

* 🚧 Port over ignore subject implementation to bsky package

*  Generate lexicons for bsky
2023-05-29 00:39:03 -04:00
David Buchanan
c62964b7b4
Limit getPostThread recursion into parents (#1062)
* limit getPostThread recursion into parents

* add parentHeight parameter

* Lexicons: specify default/min/max values for depth and parentHeight, for getPostThread

* prettier formatting

* re-run lexicon codegen

* do the rest of lexicon codegen (oops)

* add 'shallow ancestors' fetch test
2023-05-25 19:22:05 -05:00
Daniel Holmgren
743eaf1cf0
Move handle resolution to .well-known (#1048)
* move handle resolution to .well-known

* required handle on resolveHandle

* rm test

* tidy

* tidy

* fix up appview

* missing await

* atproto-handle -> atproto-did

* shift did & handle resolution to new identity package

* fix up network mocks

* fix up another test

* one more

* drop lex comment

* rm handle param

* Update packages/identity/src/handle/index.ts

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

* still temporarily support xrpc handle resolution

* typo

* ensure return value is a string

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2023-05-25 19:04:10 -05:00
dholms
2248218059 v0.3.8 2023-05-24 17:41:48 -05:00
devin ivy
53044ae48e
Get popular feedgens (#1090)
* Lexicon for unspecced popular feed gen method

* Endpoint impl for popular feed gens
2023-05-24 17:37:53 -05:00
Ilya Siamionau
a22d56aa21
Fix lexicon. "format" instead of "ref" in type "string" (#1080)
* Fix lexicon

* codegen types
2023-05-23 16:06:03 -04:00
Patryk
d661a60357
Add lexicon LexXrpcParameters, Object required properties check (#1040)
* Add lexicon LexXrpcParameters, Object required properties check

Now schemas like the one below won't validate
```
...
{

  "type": "object",
  "required": ["foo"],
  "properties": {}
}
...
````

* Fix lexicons with missing required fields

* Improve lexicon user type error messages and document why it needs to be `z.custom`
2023-05-23 01:02:36 -04:00
Daniel Holmgren
8059e07d8a
Custom feeds (#1001)
* actor type in profiles

* skeleton lex

* more schemas

* first pass at feed composition

* cleanup services

* more tidying

* fix up tests

* bookmarking schemas

* make feeds records instead of actors

* some cleanup

* fleshing out feeds as records

* wip

* working into cfg & dev-env

* fix appview test util

* bookmarking + views

* tidy

* add displayName

* db migration

* wip test

* blob processing

* first test working!

* Sync-up snapshots

* wip

* Fix pds ctx type

* Sync lexicons on pds and api

* wip

* fully refactor

* Prep for open union in reply data in bsky appview, sync-up snapshots

* msgs & ports

* Make pds did cache sqlite-friendly

* Start scaffolding more feedgen tests

* revamp appview tests

* revamp pds tests

* merge in dev env utils

* ensure plc close

* add feed gen to dev-env

* second feed gen

* named feeds in mock

* fix issue with dev-env pds appview

* update bsky snaps

* Flesh-out some feed gen tests

* Fix feed gen reply test

* Test feed bookmarking

* update skeleton defs

* merge

* Sync-up pds with updated feed skeleton contract

* Fix feed bookmark viewer state

* add feed embeds

* Test inaccurate feed gen repost

* Tighten some error behaviors around feed gens

* generator view in record embed

* test

* bookmarked/subscribed -> saved

* updated snaps

* name & descript on alices feed

* add like counts

* proposed lex

* tweak

* fetch feed generator details

* add describeFeedGen to dev-env

* adds tests for getFeedGenerator

* Update lexicons/app/bsky/feed/getFeedGenerator.json

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

* update describe

* add cid to feed gen view

* add alice feed gen avatar

* generator displayName required

* update snaps

* Fix dev env public url (#1058)

* Fix the public url used by dev-env

* move publicUrl location

---------

Co-authored-by: dholms <dtholmgren@gmail.com>

* add defs for feed gen prefs & decrease displayName length

* build branch

* updated how saved feeds works

* cleanup lex

* mount route

* Starter bsky algos (#1046)

* implement some starter bsky algos

* add team dids

* tidy

* add quotepost check to whats hot classic

* tests

* carve out feedgen section of pds

* apply limits

* add describeFeedGenerator route

* Whats hot new (#1060)

* map out new whats hot

* only available in postgres

* Fix dev env public url (#1058)

* Fix the public url used by dev-env

* move publicUrl location

---------

Co-authored-by: dholms <dtholmgren@gmail.com>

* add defs for feed gen prefs & decrease displayName length

* build branch

* updated how saved feeds works

* build algos branch

* remove relative imports to @atproto/api

* update hot classic name

* rm build

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>

* v0.3.6

* v0.3.7

* v0.1.10

* update name of skyline

* build branch

* aws build

* getFeedGenerators test

* For now only use new replyRef union for custom feeds, for compat

* Don't use replyRef union on new feeds yet

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2023-05-19 18:31:51 -04:00
Daniel Holmgren
cf36b363b4
Rkey len (#1066)
* set a lex limit on rkey length

* enforce in repo package

* rm checks in repo pkg

* lift constraint on update
2023-05-18 17:57:59 -05:00
Devin Ivy
37af595a73 v0.3.4 2023-05-17 17:02:57 -04:00
devin ivy
e57c297a82
Handling deleted content on admin/moderation methods (#1045)
* Update lexicon for missing repo/record data in admin views

* Serve missing repo/record variant in admin views

* Test actioning and presenting unknown records/repos, fix on pds
2023-05-17 15:28:52 -04:00
Patryk
1de53e99ab
Profiling (#1015)
* Add bench/profiling docs

* Fix repo benches

We probably want to create a shared config for benchmarks,
this fix isn't universal across packages

* Add benchs to API

This should help with #915 and any other future API performance investivations

* Make repo `bench:profile` wait for debugger

* Update packages/README.md

---------

Co-authored-by: Daniel Holmgren <dtholmgren@gmail.com>
2023-05-17 10:43:42 -05:00
James Garbutt
49ee070cd6
test (api, common, common-web): add further tests (#950) 2023-05-12 17:11:50 -05:00
devin ivy
1cbffd63ef
Reports by active action type (#1028)
* Lexicon updates for getting mod reports by active action type

* Update pds and bsky to support getting mod reports by active action type
2023-05-12 16:45:15 -05:00
Daniel Holmgren
5804716504
Bring your own DID (#1011)
* allow bringing your own did

* tests + tidy

* one more check/test

* fix typo

* better err names
2023-05-12 16:18:49 -05:00
dholms
deabb71da4 v0.3.3 2023-05-11 16:30:50 -05:00
dholms
0e0b310603 v0.3.2 2023-05-11 16:28:48 -05:00
Elijah
aee4d6b381
use blob as fetch fallback (#1012) 2023-05-11 16:19:09 -05:00
Paul Frazee
df6ed7d5c0
Add account preferences APIs (#1013)
* Add lexicons for account preferences

* Move prefs to app.bsky, codegen

* Setup model and services for user prefs

* Setup xrpc methods for prefs

* Test preferences, fixes

* Tidy

* Tidy

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-05-11 15:44:00 -05:00
dholms
2d3053481a v0.3.1 2023-05-11 14:47:27 -05:00
Daniel Holmgren
e32dc025e8
Mute lists (#986)
* possible schemas

* more lexicons

* codegen

* tables

* hook up processor

* getlist route

* add getListBlocks route

* migration

* didnt save something

* add reason + facets

* description facets

* get facets into db

* add to accnt deletion tests before i forget

* tests & bugfixes

* quickfix

* move defs to .graph

* add purpose

* remove unused actor defs

* add creator info to list view

* refactor to graph service

* lexicons

* impl

* writer methods

* bug in accnt service

* handle blobs

* tests

* fix typos

* tidy

* fix snap

* pr feedback

* missed drop index in migration

* remove listitem reason

* allow puts for lists

* make mute lists idempotent

* test mute list updates

* fix up

* fix err test

* update snap
2023-05-11 14:29:08 -05:00
dholms
2f43fb7454 bump api package version 2023-05-10 20:50:56 -05:00
Daniel Holmgren
d30b0f93e1
Disable account invites (#1004)
* enable disabling account invites

* xtra test

* couple fixes

* allow re-enabling user accoutn invites

* add in getter route for if invites are disabled or not

* fix admin search test

* gneerated type on user account
2023-05-09 09:24:12 -05:00
Daniel Holmgren
b20a5045a2
Rebase route (#948)
* tidy rebase query

* add rebase route

* bring tests up to speed

* add tx check
2023-05-09 05:54:48 -05:00
Jaga Santagostino
652eb50da6
Update README.md example (#993)
Update README.md
2023-05-08 17:24:01 -05:00
Wes Todd
b01e47b617
fix: updated repository field for packages (#994) 2023-05-08 11:38:42 -04:00
bnewbold
8c19ce991a
moderation action 'escalate' type (#976)
* lex: 'escalate' mod action type

* api: codegen for escalate mod action type

* pds: codegen+impl esclate mod action type

* bsky: codegen+impl esclate mod action type

* pds: prettier:fix

* Tidy

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-05-04 12:32:27 -07:00
Wes Bos
958c9ef6b3
add repository field to package.json (#895) 2023-05-01 20:43:32 -05:00
Daniel Holmgren
1e24d3e820
Include nsfw flag for getPopular (#949)
add includeNsfw flag for whats hot
2023-05-01 15:50:21 -05:00
Paul Frazee
01b5971907
api@0.2.11, pds@0.1.5 (#925)
* @atproto/api@0.2.11

* @atproto/pds@0.1.5
2023-04-28 19:41:01 -05:00
Daniel Holmgren
db1042cf0d
Blocks (#922)
* block lexicons

* table schema

* block processing

* Actor-block migration

* Add blocked post lexicon to getPostThread

* getBlocks routes

* Add missing lexicons to bsky

* Add block state to actor views

* throw on blocked accounts in getAuthorFeed

* blcok state in profile views

* Update getPostThread to support block views, update existing test

* strip out blocks out oof timeline & popular

* more routes

* Test blocked posts in threads

* Support blocks on record embeds

* notifs

* Update pds test snapshots w/ block state

* fix search

* Update pds actor search snapshots w/ blocks

* test

* tests

* update lex

* fix up from returning blocking as record

* ci for branch

* fix build issue in bsky

* more blocks tests

* fix actor search test

* hook getBlocks up to router

* bugfix & actually test lol

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-04-28 19:36:02 -05:00