Commit Graph

2872 Commits

Author SHA1 Message Date
devin ivy 13aead171c Support shallow builds and sourcemaps (#352)
* Enable all modules to be built shallowly, externalizing their deps

* Setup shallow builds to modify package.json main

* Hoist update-main-to-dist to separate call, fix lex-cli and plc shallow builds

* Generate sourcemaps during build

* Tidy

* Hoist new build deps up to root
2022-11-15 19:24:58 -05:00
Paul Frazee e02671ba82 Give 'HandleNotAvailable' error on reserved handles (#349) 2022-11-14 15:32:04 -06:00
Daniel Holmgren 43788cdc5a Show own reposts in timeline views (#348)
show own reposts in timelines
2022-11-14 13:42:12 -06:00
Paul Frazee 60071e0770 Handle updateProfile when no record exists (#343)
* WIP handle updateProfile when no record exists

* create new profile in updateProfile

Co-authored-by: dholms <dtholmgren@gmail.com>
2022-11-11 14:10:56 -06:00
devin ivy 5b4e2b9ee3 Fix test snapshots post-merge (#342) 2022-11-11 14:59:29 -05:00
Daniel Holmgren 2d947be9c2 Allow updating scene profiles (#341)
allow updating scene profiles
2022-11-11 13:36:36 -06:00
Paul Frazee a1bee406e2 Add app.bsky.graph.getAssertions() (#340)
* Add app.bsky.graph.getAssertions()

* Update getAssertions to support query by author or subject

* Revert accidental change to members test
2022-11-11 12:38:25 -06:00
Daniel Holmgren 962041e6c1 Scene trending (#327)
* wip

* views

* trending schema

* starting message queue

* scene processor

* wip

* send mq messages from db

* db events

* undo screwing up codegen lol

* setup queue

* db migrations

* fixing up message processing

* div by 0 check

* tx issue

* queue use cursor

* update not insert

* sql bugfix + tests

* trying to linearize tests

* correclty serializing txs

* attempt update before insert

* log errors

* handle gaps in cursor

* cleanup

* oops reenable test

* correctly incr cursor
2022-11-11 12:29:48 -06:00
Paul Frazee 8e548af023 Add missing execute() to confirmation delete (#339) 2022-11-10 16:51:26 -06:00
devin ivy 8ab87ff1f7 Standard actor declarations in app.bsky (#338)
* Include scene trends in feeds

* Tidy

* Tidy

* Sweep app.bsky schemas for standard actor declarations, remove reference from com.atproto

* Replace declarationCid on follow, assertion, confirmation records

* Sweep pds for standard app.bsky actor declarations

* Fix dev-env

* Tidy after merge
2022-11-10 15:46:16 -05:00
devin ivy c52b9f0771 Include scene trends in feeds (#335)
* Include scene trends in feeds

* Tidy

* Tidy
2022-11-10 14:26:57 -05:00
Paul Frazee 7431e65f2a Fix codegen signature for the record delete methods (#336) 2022-11-10 12:26:32 -06:00
Daniel Holmgren e6471a7419 Trend schemas (#333)
trend schemas
2022-11-09 14:44:46 -06:00
devin ivy da8f055816 Align XRPC parameters with subset of json schema (#328)
* Model procedure for setting a vote on a post

* Implement app.bsky.feed.setVote() method

* Support json schema subset for parameters in lexicon and lex-cli

* Update lexicons w/ json schema parameters

* Use enum in getVotes parameters

* Support json schema subset for parameters in xrpc-server, ajv validation

* Include parameter enums in generated markdown

* Tidy

* Unify xrpc parameter md docs with inputs and outputs: show ts interfaces

* Tidy
2022-11-09 15:39:47 -05:00
devin ivy 1bd8ef1811 Implement setVote() method (#325)
* Model procedure for setting a vote on a post

* Implement app.bsky.feed.setVote() method

* Ensure setVote() no-ops when already in correct state
2022-11-09 15:24:35 -05:00
Paul Frazee e1150465ab Add 'member' to getProfile state output, and add some dev-env mock data (#332)
* Add a scene to the dev-env mock data

* Add 'member' to myState output of getProfile

* Await db writes in dev env mock data

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

Co-authored-by: devin ivy <devinivy@gmail.com>
2022-11-09 14:09:16 -06:00
Daniel Holmgren 8b689de071 Reenable account tests + quick fix (#326)
reenable + quick fix
2022-11-08 16:12:11 -06:00
Daniel Holmgren 58634c47d7 Scene membership (#322)
* schemas

* routes

* bugfix

* tests

* test fixups

* delcaration in member views

* sort notif output
2022-11-08 14:22:16 -06:00
Daniel Holmgren 0d98291c42 Indexing rework (#317)
* remove unnecessary db plugin methods

* plugin types & remove declaration table

* assertion things

* wrap up things

* simplify table names
2022-11-08 12:14:15 -06:00
devin ivy b117ae4568 Move from likes to votes (#319)
* Model votes in lexicon, remove likes

* Model votes in db, setup notifs, fix schema

* Update pds logic, move likes to votes

* Codegen

* Update tests for votes

* Test vote filter by direction

* Fix dev-env
2022-11-08 11:02:41 -05:00
Paul Frazee cd1b64e600 Add app.bsky.actor.getSuggestions (#318)
* Fix some lexicon filenames

* Add app.bsky.actor.getSuggestions
2022-11-08 09:40:52 -06:00
Alberto Roura 1a32d5664f Added full stop to descriptions (#312)
Added full stop to description

Done for consistency across files and for potential future documentation.
2022-11-08 07:58:03 -06:00
Daniel Holmgren b530a13d09 Scene creation & membership (#304)
* scene creation w unique handles

* wip

* user_dids -> did_handle

* invites -> assertion/confirmation

* do all the ops on scene create

* start tests + bug fixin

* user can make requests on behalf of scene

* accepting invites

* fix schema names

* get scene profiles

* return actor type in getProfile

* scene views test

* notifications test

* patch up a few db things

* rework handle & email noramlization

* codegen createscene errors
2022-11-07 14:33:33 -06:00
Paul Frazee 70c525f806 Rework post text slices to be objects (#311) 2022-11-04 18:26:33 -05:00
Paul Frazee 6053031d0d A couple improvements to the markdown generator to improve clarity (#310) 2022-11-04 15:28:00 -05:00
devin ivy d6a189f59a Healthchecks for PDS and PLC (#309)
* Add plc healthcheck, unify plc server interface with pds

* Add pds healthcheck

* Make plc test util file consistent with other packages

* Fix types in dev-env

* Type fixes

* Tidy

* Rename healthcheck routes, place pds's under /xrpc
2022-11-04 16:26:56 -04:00
Paul Frazee e61127111a Split lexicons into more specific namespaces (#306)
* Segment lexicons into more specific namespaces and tighten up some naming conventions

* Update API to use new lexicons

* Update pds and dev-env to use new lexicons
2022-11-04 12:59:00 -05:00
Daniel Holmgren 7ee821312a Handle package (#305)
* handle package

* forgot a couple things

* few more fixes
2022-11-03 17:55:33 -05:00
Daniel Holmgren 7fdbb4dbb5 Username -> Handle (#303)
* schemas

* db

* atproto xrpc

* bsky xrpc

* got er done
2022-11-03 11:35:21 -05:00
devin ivy f87cb10d36 Add subject to password reset email (#302) 2022-11-02 20:35:56 -04:00
devin ivy a42d98b280 Allow duplicate block by the same did w/ sql blockstore (#301)
* Allow duplicate block by the same did w/ sql blockstore

* Typo
2022-11-02 20:27:41 -04:00
Paul Frazee 9289ce15c6 Rename getHomeFeed to getTimeline to improve some semantic clarity (#300) 2022-11-02 16:52:25 -05:00
Paul Frazee c986066e4c Update XRPC procedures to use request body by default (#297)
* Update lexicons of xprc procedures to avoid using query params when possible

* Update code generated by lex-cli to reduce param counts

* Update all API usages to new signatures

* Fix readme

* Remove params from postNotifiactionsSeen lexicon schema
2022-11-02 16:37:58 -05:00
Daniel Holmgren 4229ac91a5 Remove badges (#291)
* rm schemas

* rm db

* wrapping up

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2022-11-02 10:30:23 -05:00
Paul Frazee 794d87e8c1 Lexicon tokens (#292)
* Add token schema types to lexicon package

* Add token-schema support to lex-cli package generation of markdown, client code, and server code

* Add two token lexicons: actorUser and actorScene

* Remove dead code
2022-11-02 10:20:04 -05:00
devin ivy 55a07dd4d5 Fix app.bsky.post entity def to be more intuitive (#294) 2022-11-02 10:19:07 -05:00
joev aa604b0a98 Fix typo in PLC docs to point to correct key for recovery (#293)
* Fix typo to point to correct key for recovery.

* Fix another typo: 'recovery' -> 'recover'.
2022-11-02 10:33:59 -04:00
devin ivy a6c5737bb5 Session management in PDS client (#288)
* Move codegen api client into its own directory

* Implement session-aware client for pds

* Test pds session client, fixes

* Use pds lexicon rather than api types where possible

* Tidy
2022-11-02 09:55:51 -04:00
Daniel Holmgren 2fb128d94f Account declaration & invites (#289)
* schemas

* database & buffing up schemas

* declaration on createAccount, + fixing up test client

* fix up dev-env

* schema comments

* nsid for declaration actorType

* declaration description

* oops token schema slipped in

* declaration -> declarationCid

* missed a couple of db things
2022-11-01 18:15:52 -05:00
Daniel Holmgren 6bf748bc70 Remove outdated cli (#290)
remove cli
2022-11-01 15:00:22 -05:00
Daniel Holmgren 8982e13ff4 Username validation (#282)
* user-did table

* yay fixed it

* resolve available domains from db

* serverDid + tests

* check for invalid domains

* username validation

* woopsied on merge

* fix migration

* lower indexes

* even moar validation
2022-11-01 14:30:37 -05:00
devin ivy 51dd5665a1 Session refresh token for PDS (#286)
* Update lexicons for auth refresh token

* Implement pds refresh tokens

* Test pds auth sessions

* Fix dev-env

* Tidy

* Ignore invalid revoked and expired tokens during deleteSession
2022-10-31 20:41:51 -04:00
Daniel Holmgren 94a4f7ec41 simple repo benchmarks (#246)
* simple repo benchmarks

* cleanup
2022-10-31 12:13:38 -05:00
devin ivy 817d238880 Fix PDS readme link (#285)
Fix pds link
2022-10-30 10:34:05 -04:00
Daniel Holmgren ac8569496c Name Resolution (#278)
* user-did table

* yay fixed it

* resolve available domains from db

* serverDid + tests

* check for invalid domains

* mv available domain check to constructor

* oops reverse check
2022-10-28 18:06:17 -05:00
devin ivy b3966734de Misc HTTP error fixes (#280)
* Avoid double decode for plc params

* Unify http error handling across plc and pds, avoid reflected xss, details of unexpected errors

* Check headersSent in plc error handler

* Test pds error handler in isolation
2022-10-28 17:40:36 -04:00
devin ivy 4cc8f02575 Add public url config to pds for setting did service endpoint (#281)
* Add public url config to pds for setting did service endpoint

* Test pds public URL
2022-10-28 17:13:10 -04:00
Daniel Holmgren 9879f673ad SQL Blockstore (#276)
* setting up sql-blockstore

* drop table migration

* unblock sqlite tx

* correct binary types

* lol woops

* block encoding utilities

* no longer store raw record in record table

* fix dev-env

* pr feedback

* tx check
2022-10-27 13:26:17 -05:00
Daniel Holmgren 21ff052da9 Dont reexport CID type (#277)
dont reexport cid
2022-10-26 23:13:50 -05:00
Daniel Holmgren 9b66f20abb Kms keypair (#270)
* scaffold package

* kms working!

* interface

* normlize for low s

* no der encoding in crypto

* comments

* rm kms tests

* pr feedback
2022-10-26 23:13:36 -05:00