atproto/lexicons/tools/ozone/team/addMember.json
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

42 lines
1.0 KiB
JSON

{
"lexicon": 1,
"id": "tools.ozone.team.addMember",
"defs": {
"main": {
"type": "procedure",
"description": "Add a member to the ozone team. Requires admin role.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["did", "role"],
"properties": {
"did": { "type": "string", "format": "did" },
"role": {
"type": "string",
"knownValues": [
"tools.ozone.team.defs#roleAdmin",
"tools.ozone.team.defs#roleModerator",
"tools.ozone.team.defs#roleTriage"
]
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "tools.ozone.team.defs#member"
}
},
"errors": [
{
"name": "MemberAlreadyExists",
"description": "Member already exists in the team."
}
]
}
}
}