979 Commits

Author SHA1 Message Date
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
github-actions[bot]
b398276b36
Version packages (#2932)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-08 10:22:43 +01:00
Damien Tournoud
92cd7a84ad
PDS_BSKY_APP_VIEW_ENDPOINT is now PDS_BSKY_APP_VIEW_URL (#2960)
This has changed about a year ago, but this example was missed.

Fixes: d664b51c6490ebed3557c002ad912cfa828aef56
2024-11-07 19:48:53 -08: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
Pyrox
124eaee8f2
bsky,pds: sharp 0.32.6 -> 0.33.5 (#2958) 2024-11-07 19:16:33 -05: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
dan
9e18ab6a35
Fix optimistic getPostThread for URIs with handle (#2946)
* Harden test coverge (add failing test)

* Resolve handle for post thread request

* Changeset
2024-11-04 18:28:39 -06:00
Matthieu Sieben
9ffeb5216a
Allow retrying proxied requests (#2850)
* Allow retrying proxied requests

* fix tests

* remove un-necessary code

* Only retry on socket errors
2024-10-31 00:21:05 -04:00
github-actions[bot]
7ea0fc146b
Version packages (#2930)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-30 18:36:37 -05: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
github-actions[bot]
d9fcaf8a78
Version packages (#2928)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-30 18:07:13 -05: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
github-actions[bot]
91bd63ba38
Version packages (#2925)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-29 18:20:10 -05:00
Daniel Holmgren
0204a678d5
Support alternate did methods in update handle (#2922)
* support alternate did methods in update handle

* add colon

* force refresh

* Update packages/pds/src/api/com/atproto/identity/updateHandle.ts

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

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2024-10-29 17:57:19 -05:00
Ilya Siamionau
de194398ed
Fix root block missing in too big seq commit (#2894)
* Fix root block missing in too big seq commit

* Update packages/pds/src/sequencer/events.ts

* fix indentation

---------

Co-authored-by: Daniel Holmgren <dtholmgren@gmail.com>
2024-10-29 17:56:22 -05:00
github-actions[bot]
c307a75db1
Version packages (#2889)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-24 11:32:50 -05:00
Matthieu Sieben
81ae1b1238
Fix dockerbuild (#2891)
* do not install puppeteer in prod

* fix

* single bracket
2024-10-18 20:57:31 +02:00
Matthieu Sieben
9d40ccbb69
Various OAuth related fixes (#2871)
* wip

* tidy

* tidy

* tidy

* Update packages/oauth/oauth-client/src/session-getter.ts

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

* fix combineSignals

* tidy

* tidy

* improve typing of atprotoScopeSchema

* stronger typings

* tidy

* ci

* Fix cors error

* downgrade ioredis dependency

* fix ioredis version

* tidy

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2024-10-18 20:23:33 +02:00
Matthieu Sieben
7f26b17652
Add OAuth tests (#2874)
* Improve error message when using invalid client_id during code exchange

* Extract SPA example OAuth client in own package

* wip

* remove dependency on get-port

* Properly configure jest to only transpile "get-port" from node_modules

https://jestjs.io/docs/configuration#transformignorepatterns-arraystring

* Use dynamically assigned port number during tests

* use puppeteer to run tests

* remove login input "id" attribute

* code style

* add missing declaration

* tidy

* headless

* remove get-port dependency

* fix tests/proxied/admin.test.ts

* fix tests

* Allow unsecure oauth providers through configuration

* transpile "lande" during ozone tests

* Cache Puppeteer browser binaries

* Use puppeteer cache during all workflow steps

* remove use of set-output

* use get-port in xrpc-server tests

* Renamed to allowHttp

* tidy

* tidy
2024-10-18 15:40:05 +02:00
Matthieu Sieben
fabc8a9381
Update typescript to version 5.6.2 (#2863) 2024-10-11 14:05:53 +02:00
github-actions[bot]
4f6f57a33e
Version packages (#2870)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-11 10:44:20 +02: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
github-actions[bot]
3e1ae8d1d5
Version packages (#2861)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-04 15:07:43 -04:00
github-actions[bot]
556c5a549c
Version packages (#2859)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-03 20:36:45 -05:00
github-actions[bot]
600fea65d4
Version packages (#2856)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-03 14:07:55 -05:00
Daniel Holmgren
df14df522b
Ozone signature methods (#2855)
* lexicons

* fix typo & add proxy routes

* changeset
2024-10-03 14:00:12 -05:00
github-actions[bot]
a611a5fe56
Version packages (#2846)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-01 20:13:26 +02: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
Matthieu Sieben
4098d98901
Default to unencoded responses (#2834)
* Allow defaulting to unencoded responses when proxying client requests that do not specify accept-encoding
* fix content-encoding negotiation
2024-10-01 10:43:15 +02:00
Eric Bailey
27882035e7
Use uppercase 2fa codes in email templates (#2843)
* Update email templates

* Format random readme
2024-09-30 17:18:33 -05:00
github-actions[bot]
6593fdc3f4
Version packages (#2812)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-27 13:04:34 -05: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
Matthieu Sieben
b298bfd280
Prevent PDS crash when catchall proxy request are cancelled (#2824)
* Prevent PDS crash when catchall proxy request are cancelled

* fixes

* ensure stream destruction
2024-09-24 11:55:29 -05:00
Matthieu Sieben
a07b21151f
PDS pipethrough optimizations (#2770)
* Micro optimization in request proxying

* Request NSID parsing optimization

* DID document parsing optimization

* remove un-necessary call to next()

* Allow HandlerPipeThrough to be used with streams

* Refactor pipethrough to work with streams

* Expose "unicastLookup" DNS lookup and "isUnicastIp" utilities

* Use a hardened, HTTP2 compatible, client to perform proxied requests

* changeset

* tidy

* Properly handle compressed streams

* tidy

* update @types/node

* refactor

* Improved error management

* Expose parseContentEncoding() util

* use pipeline from nodejs

* Avoid decoding in read-after-write (if possible)

* Various fixes

* Return Buffer instance from streamToBytes

* fixes

* Add omit() utility

* tidy

* lint

* typo

* Use Buffer instead of ArrayBuffer form pipe through handler result

* optimization

* tidy

* refactor

* increase highWaterMark

* remove un-necessary type check

* Use undici.request where more relevant

* Improve soc in fetch utils

* feedback

* fidy

* tidy

* test refactor

* safer fetch

* changeset

* expose and re-use extractUrl util

* small optimizations

* tidy

* optimization

* build branch

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2024-09-19 18:24:20 -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
a06634ae57
Email templates at (#2813)
* Add @ to handles, update PLC copy

* Changeset

* lint

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2024-09-12 11:57:41 -05:00
Eric Bailey
922b94ce37
Update email templates (#2767)
* Update email templates

* Update PLC

* Update test with new email string

* Format

* One more test update

* Use handle instead of identifier to match entryway

* Changeset
2024-09-12 10:53:31 -05:00
github-actions[bot]
85c85350d1
Version packages (#2791)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-11 18:30:47 -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
Daniel Holmgren
bcefbdbc6b
Slow down get repos (#2802)
* slow down get repos

* move wait
2024-09-08 20:32:55 -05:00
github-actions[bot]
0a37a3cc56
Version packages (#2788)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-04 20:22:22 -05:00
Daniel Holmgren
b15dec2f4f
Atproto sync package (#2752)
* first pass/port

* reworking

* authenticated commit parsing

* authenticate identity evts

* some testing

* tidy & add firehose to queue

* error handling

* fix test

* refactor sync queue + some tests

* fix race in sync queue

* rm firehose from syncqueue

* add tests for queue utils

* README

* lint readme

* filter before parsing

* pr feedback

* small fix

* changesets

* fix type

* Rework dataplane subscription (#2766)

* working sync package into appview subscription

* add restart method to subscription for tests

* fix another test

* tidy subscription utils/files

* remove dupe property

* tidy after merge

* fix start cursor on subscription

* tweak process full subscription logic

* fixes
2024-09-04 20:18:16 -05:00
github-actions[bot]
71305e8595
Version packages (#2764)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-04 14:23:00 +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