24 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Foysal Ahamed
3ad0519961
Ozone team member manager (#2460)
* 🚧 Proposal for moderator manager lexicons

*  CRUD for moderator management works

*  Add profile view to moderator user list

*  Seed mod users from env var to db

*  Adjust tests

*  Update snapshots

*  Fix type and lexicon token issues

*  Add pagination to listUsers

*  Use sort order in pagination

* 📝 Change error name

*  Update snapshots

*  seed mods in sync to avoid re-order

* 🧹 Remove unnecessary import

* 🐛 Re-run codegen

* 🧹 Some cleanup

* 🧹 Cleanup unnecessary properties on auth-verifier

*  Rename terminologies from moderator to team and member

* 🧹 Cleanup

*  Allow admin tokens to update/add member

*  Delete members in transaction

*  Use db transactions and move profile hydration to the service layer

*  Add test for addMember endpoint

* 🐛 wait on adding admin DID

*  Do not allow updating/deleting service owner and always give service owner admin access

* 🧹 Cleanup

*  Make timestamp columns non null

* 🧹 Cleanup

*  Update mod role definition in getConfig

*  Deletion and update guards

* 🐛 don't prefill service did

* 📝 Add changeset
2024-06-18 18:47:20 -04:00
Foysal Ahamed
8d2d3ac9e0
Add server.getConfig endpoint to ozone (#2494)
*  Add server.getConfig endpoint to ozone

*  Fix tests

*  Cleanup snapshot

* 🧹 Tidy up lexicons

*  Change role values to match with upcoming mod-manager roles

*  Add chat service config

* Update lexicons/tools/ozone/server/getConfig.json

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

*  Update lexicons

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2024-06-05 11:05:21 -04:00
Daniel Holmgren
255d5ea1f0
Account deactivation (#2531)
* subscribe repos lex: new #account event type

* lex: getAccountStatus endpoint

* lex: add account status errors to sync methods

* tweak type of token union

* fix getAccountStatus parameter name

* codegen

* Account -> Repo

* re-codegen

* update errors in sync methods

* add getRepoStatus route

* add account events to sequencer

* emit account evts

* fix test + small bugfixin

* handle evt on bsky side

* codegen

* loggable message

* schema tweaks

* build errors & tidy

* tidy account deactivation tests

* more subscribe repos tests

* identity evt tests + tidy

* return optional did doc on identity evts

* update identity evt

* update impl for identity evt handles

* add description to handle field

* status on listRepos & notate deprecated firehose events

* return status on listRepos

* pr feedback

* tests

* protos

* add status to session schemas

* codegen

* revamp auth-verifier

* thread through agent

* fix tests

* fix account deletion test

* fix more tests

* fix type error in repo.test

* bsky index account evts

* apply in appview

* add to admin route

* add deactivatedAt to ozone views

* pds tests

* appview tests

* ozone test

* fix bsky test

* fix agent test

* fix indexing test

* tweak session schemas

* update session routes & clean up status handling in pds & agent

* changeset

* patch pds test

* rm active from knownValues

---------

Co-authored-by: bryan newbold <bnewbold@robocracy.org>
2024-05-31 16:39:21 -05:00
Daniel Holmgren
265ce86e15
Ozone chat integration (#2490)
* wip

* schema tweaks

* room -> chat

* missed one

* missed another

* deleted messages + incoming message settings

* add schemas for blocking users

* chat update schemas

* make updateUserSettings more generic

* fix dangling ref

* fix dangling refs

* mute chats & leave chats

* schema consistency, naming

* lexicon for updating chat read state

* dm lexicon updates, add batch send endpoint

* dm sender on deleted message

* Add codegen for temp lex

* lexicon: switch temp.dm to chat.bsky namespace, misc fixes

* lexicon: codegen

* lexicon: fix some chat/convo terminology

* lexicon: codegen

* moderator schemas

* codegen

* lexicon: consistency in chat lexicons

* lexicon: add chat to associated profile info

* add ref to updateActorAccess

* add annotation on convoView for disabled members

* codegen

* ozone lexicons

* scaffold routes

* hook up chat moderation routes to ozone

* add message subject for reports/events

* remove dm references from ozone schemas

* ensure report exists before serving getMessageContext

* 🐛 Fix typo in column name

* adjust before/after instead of throwing

* add dev script

* add dev-env introspection server

* hook up chat mod routes to pds & ozone

*  Add message ref subject in eventView def

* fix typo

* add chat reporting test

* fix test

* update dev-env chat did

* update dms server routes name

* pr feedback

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
Co-authored-by: Eric Bailey <git@esb.lol>
Co-authored-by: Foysal Ahamed <foysal@blueskyweb.xyz>
2024-05-15 18:52:47 -05:00
noriaki watanabe
24761c8bfa
Resolve duplicate refs in lexicon of ozone (#2451)
* Resolve duplicate refs

* Fix order of refs of "tools.ozone.moderation.emitEvent"
2024-04-30 11:32:43 -07:00
Foysal Ahamed
58551bbe05
Allow muting reporter (#2390)
*  Allow muting reporter

*  Allow fetching ONLY muted subjects

* 🚨 re-run linter on fixed main

*  Track muted reports

*  Adjust snapshot

*  Adjust snapshot

*  Adjust snapshot

* 📝 Add changesets

* ♻️ Refactor muted reporter check

*  Use new event type for muting/unmuting reporter

* 🧹 Cleanup
2024-04-25 10:43:04 -04:00
Daniel Holmgren
2ea27e340a
Ozone lexicons (#2288)
* lexicons

* clean up old admin schemas

* codegen

* renaming all routes

* fix more

* fix snaps

* fix test

* format

* hook up ozone routes on pds

* publish next version

* build branch

* dont build branch
2024-03-12 18:42:11 -05:00