Commit ef519ae
feat: add Teams (Circles) async API (#403)
## Summary
Closes #343
- Adds async-only `_AsyncTeamsAPI` module (`nc_py_api/teams.py`) for
managing Nextcloud Teams (Circles)
- Full CRUD: create, get_list, get_details, destroy, edit_name,
edit_description, edit_config
- Member management: add_member, add_members, remove_member,
set_member_level, confirm_member, join, leave
- Data classes: `Circle`, `Member` with typed properties
- Enums: `MemberType`, `MemberLevel`, `CircleConfig` (IntFlag)
- Registered on `_AsyncNextcloudBasic` — available on both
`AsyncNextcloud` and `AsyncNextcloudApp`
Following the async-only policy for new features — no sync variant.
## Test plan
- [x] 17 async tests in `tests/actual_tests/teams_test.py`
- [x] `test_teams_available` and `test_teams_create_destroy` run in both
client and AppAPI modes (`anc` fixture)
- [x] Circle CRUD: create, get_list, get_details, destroy, edit_name,
edit_description, edit_config
- [x] Member lifecycle: add_member, add_members (multi), remove_member,
set_member_level
- [x] Join/leave open circle flow
- [x] Personal and local circle creation
- [x] Error handling: destroy nonexistent circle raises
`NextcloudException`
- [x] Full suite: 613 passed, 6 skipped, 0 failures
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added Teams (Circles) API: create, list, edit, delete teams; manage
membership and roles; join/leave flows.
* Exposed Teams-related types on the package public API.
* **Tests**
* Added comprehensive async integration tests covering lifecycle,
membership, role changes, join/request/confirm flows, and config flags.
* **Chores**
* CI workflow updated to enable and configure the Circles app during
test matrix runs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Review <review@local>1 parent b202bd4 commit ef519ae
5 files changed
Lines changed: 736 additions & 0 deletions
File tree
- .github/workflows
- nc_py_api
- tests/actual_tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
216 | 223 | | |
217 | 224 | | |
218 | 225 | | |
| |||
224 | 231 | | |
225 | 232 | | |
226 | 233 | | |
| 234 | + | |
227 | 235 | | |
228 | 236 | | |
229 | 237 | | |
| |||
233 | 241 | | |
234 | 242 | | |
235 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
236 | 247 | | |
237 | 248 | | |
238 | 249 | | |
| |||
379 | 390 | | |
380 | 391 | | |
381 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
382 | 400 | | |
383 | 401 | | |
384 | 402 | | |
| |||
390 | 408 | | |
391 | 409 | | |
392 | 410 | | |
| 411 | + | |
393 | 412 | | |
394 | 413 | | |
395 | 414 | | |
396 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
397 | 419 | | |
398 | 420 | | |
399 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| 159 | + | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| |||
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| 182 | + | |
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
| |||
0 commit comments