23 Commits

Author SHA1 Message Date
Daniel Holmgren
bfaf3a86f9
Handling updates ()
* disabled udpates

* remove update tests

* update schemas

* crud operations

* working cids into db layer

* crud working

* views tests working & updated snapshots

* rm tests for likes on reposts

* fix up repo tests

* quick pr feedback

* recordKey -> rkey & nameOrDid -> user

* reference records by uri & cid obj

* fix dev-env
2022-10-12 18:36:40 -05:00
Paul Frazee
90cdb99bdd
Update NSID semantics to final ()
* Improve lex-cli to remove files that no longer exist

* Update lex-cli to use new ns

* Rename lexicons: todo.adx to com.atproto, todo.social to app.bsky

* Improve lex-cli md generator
2022-10-12 14:32:18 -05:00
devin ivy
59f18ac707
Forgot password methods ()
* Schemas and scaffolding for reset password methods

* Initial handler for todo.adx.requestAccountPasswordReset

* Initial handler for todo.adx.resetAccountPassword

* Implement server mailer

* Configure server for mailer and testing w/ mailer

* Test happy path of pass reset, fix reset bug

* Update lex to fix types bug for requestAccountPasswordReset

* Fix handlebars reference to config getters

* Test some negative password reset flows

* Minor cleanup to pass reset

* Tidy handlebars file with prettier, supporting double-quotes for html

* Fix esbuild of server for mailer templates, fix test issue

* Misc tidying for password reset

* Misc tidying for password reset
2022-10-06 14:24:26 -04:00
Daniel Holmgren
b3c60696da
Invite codes ()
* implement invite codes

* siwtch to admin basic auth & tests

* signular InviteCodeUse for table name

* comment

* pr fixups

* tx TODOs
2022-10-04 15:13:55 -05:00
Paul Frazee
11928993dc
Make the cursor field a required output in get*Feed () 2022-10-04 12:28:49 -05:00
devin ivy
d64e4f6a75
Support firehose feed algorithm ()
* Split getFeed() into getAuthorFeed() and getHomeFeed()

* Remove unused getFeed codegen file

* Unify queries for getHomeFeed and getAuthorFeed

* Factor out common query parts for building feeds

* Test firehose and default feed algorithm

* Fix api tsconfig reference
2022-10-04 12:18:34 -05:00
Daniel Holmgren
8b0884a315
Notifications ()
* notification methods on tables

* process notifs

* last seen

* notifs xrpc methods

* seen notifs route

* register route

* notifications tests

* rm unused db method
2022-09-30 11:09:42 -05:00
Daniel Holmgren
ee68e6977b
Pds Did integration ()
* parsing dids to something we understand

* revamping did-sdk with did-resolver

* testing

* fixing some thigns & finishing tests

* fix type error & remove old test

* wip

* create did on server & add email

* check username available & store email

* better test utils

* remove did:test

* allow authstore to sign for controlled dids
2022-09-28 17:36:53 -05:00
Paul Frazee
6b47ad7622
Add better cursor pagination behavior to getFeed () 2022-09-28 17:33:18 -05:00
Paul Frazee
a21417ba91
Improved XRPC error protocol ()
* Add lexicon doc

* Update error-handling spec

* Implement new error-behaviors in xrpc and xrpc-server packages

* Update lexicon and lex-cli packages to add xrpc error behaviors

* Generate new API and test an error behavior
2022-09-28 11:55:43 -05:00
Paul Frazee
31bd54e69c
More client integration updates ()
* Update dev-env to use new authorization system

* Add did and name to createSession response body

* Handle not found in getProfile api

* Stop putting a timestamp in the generated code, ffs

* Add todo.adx.getAccountsConfig

* Remove timestamps from schema codegen
2022-09-27 12:32:17 -05:00
Daniel Holmgren
1d136eba17
JWT auth ()
* setting up auth

* sticking auth on all the routes

* fixed up tests

* add util.getAuthstore fn

* rm fixed TODO

* use nodes native scrypt
2022-09-23 11:11:16 -05:00
Paul Frazee
3a4e4c0759
Dev env tooling, server package restructuring, add did:test and *.test rules ()
* Add ServerConfig class

* Update todo.adx.resolveName spec to make name param optional

* Add .test username and did:test behaviors

* Document name/did resolution and the .test/did:test behaviors

* Move did:test registry into server config to share across servers in the dev env

* Rework the server package structure to make it easier to include as a library

* Fix dev-env build issues

* Give better error when repo API is called on an invalid DID

* Add mock data environment to dev-env
2022-09-22 13:34:46 -05:00
Paul Frazee
f67626e5f2
Unify schemas under lexicon package ()
Unify schemas under lexicon package; remove schemas package; rename xrpc-cli to lex-cli
2022-09-20 18:08:30 -05:00
Paul Frazee
1425b0cd4f
New XRPC-based Server and API implementations ()
* Add xrpc-cli package; implement 'new' and 'gen-md' commands

* Add gen-ts-obj to xrpc-cli

* Add gen-api command to xrpc-cli

* Add gen-server to xrpc-cli

* Update codegen from xrpc-cli to run prettier and include a banner comment

* Use 'void' instead of 'undefined' for return type

* Skip invalid schemas when generating code

* Rewrite schemas package to use new simplified schema

* Output type definitions in nested folders

* Add record schema code-generation

* Change xrcp client call() signature to be easier to use

* Update client codegen to match new xrpc call signature

* Fixes and improvements to generated record APIs

* Update generated api to use per-service instances

* Add xrpc-cli readme

* (WIP) Rewrite server to use xrpc

* Add missing references to server/tsconfig.json

* Replace api implementation with xrpc generated client

* Add /schemas folder with todo.adx

* Add /schemas/todo.social

* Update api package to include todo.social xrpc and adx schemas

* Update server package to include todo.social xrpc and adx schemas

* Fix some schema definitions

* (WIP) Work toward xrpc update of server

* Update auth package to use nsids for collections

* Update repo package to use nsids for collections

* Update AdxUri to use nsid collection IDs

* Bring server CRUD tests to passing state

* Move API to simpler xrpc call signature

* Apply fixes and improvements to record apis

* Update to new generated api with per-service instances

* Rename the todo.social.* view methods

* Rewrite the views system to use xrpc

* Remove paths accidentally added to tsconfig

* Remove microblog package

* Add simple API readme

* todo about deduping ucan prfs

* increase postThread default depth to fix failing test. & fix USE_TEST_SERVER config

Co-authored-by: dholms <dtholmgren@gmail.com>
2022-09-20 17:39:05 -05:00
dholms
d5fe1880ff fix up api package as well 2022-09-12 21:14:14 -05:00
dholms
550136f05c cleanup 2022-09-12 15:58:25 -05:00
dholms
dad56e802f crud tests 2022-09-09 15:25:36 -05:00
dholms
581834aad4 fixing up views for schemas 2022-09-08 15:45:52 -05:00
dholms
f736794859 fixing up api pkg 2022-09-08 14:08:22 -05:00
dholms
aede15bd29 api routes 2022-08-30 19:15:09 -05:00
dholms
7271e8d2f3 repo roots & http-types 2022-08-19 15:52:57 -07:00
Paul Frazee
fd08591933
API package ()
* WIP API branch squash

 * Cleanup

 * Add missing pieces of API package's api

 * Add locale support to schemas package

 * Add test for view schemas

 * Add validation to the view api

 * Add createViewValidator() to schemas

 * Add client-side schema validation to record CRUD ops

 * Add writes to API client

 * WIP make progress on the PDS API (server and client)

 * Add .collection and .recordKey to AdxUri

 * Move name-resolution code to common

 * Remove leftover imports

 * WIP progress on API client code-structure

 * More progress on API module

 * WIP: Refactor server routes

 * Update schemas to use the canonical name & id for keying

 * Fix a bug in the schemas readme

 * Schemas readme improvements

 * Add @adxp/schemas

 * Fix typo in AdxUri regex that allowed invalid characters in names

 * Remove accidental commit

 * WIP: Add @adxp/api package

 * WIP: add .mkuser to dev-env repl

 * Allow colons in the adx uri name section

 * Update did:web devenv server to allow overwriting dids

 * Add AdxUri utility class

* Move api and schemas packages to the packages folder

* Update schemas package to use new repo structure

* Update API package to use new build system

* Fix some merge conflicts that werent caught earlier

* Switch from .incompatible to .compatible

* Dont send authStore over the wire

* Quick patch - refactor followup ()

* patching ws-relay build

* added @babel/core

* fixed package exports ()

* Quick auth lobby fix ()

* readme update

* fixed up api build

* cleaned up uri tests

* api types

* fix old esm imports & temporarily remove server tests

Co-authored-by: Daniel Holmgren <dtholmgren@gmail.com>
2022-07-14 18:36:23 -05:00