Staff users
Staff accounts (owner / staff / teacher). There is deliberately no
delete_user — the staff UI never hard-deletes an account either (that
would need service_role to touch auth.users); “removing access” is
update_user with active: false, a reversible soft deactivation that
preserves history on anything FK’d to the user (classes taught, revenue
share).
list_users
Section titled “list_users”| Argument | Type | Required | Notes |
|---|---|---|---|
limit | number | no | default 50, max 200 |
offset | number | no | default 0 |
Ordered by full_name ascending. Available to any staff member.
invite_staff
Section titled “invite_staff”Owner-only. Sends a Supabase Auth email invite; the invitee sets their own password.
| Argument | Type | Required | Notes |
|---|---|---|---|
email | string | yes | |
full_name | string | yes | |
role | owner | staff | teacher | yes |
update_user
Section titled “update_user”Owner-only. Partial update.
| Argument | Type | Required | Notes |
|---|---|---|---|
id | uuid | yes | |
full_name | string | no | |
role | owner | staff | teacher | no | |
active | boolean | no | false = revoke access. Cannot be set to false on the caller’s own id. |