feat: get user self orgs endpoint
All checks were successful
ci / lint_and_test (push) Successful in 14s
All checks were successful
ci / lint_and_test (push) Successful in 14s
This commit is contained in:
parent
ebcb0362c6
commit
56569f09db
2 changed files with 59 additions and 0 deletions
|
|
@ -5,9 +5,27 @@ Pydantic models for the user module
|
|||
from typing import Optional
|
||||
from pydantic import EmailStr
|
||||
|
||||
from src.organisation.constants import Status
|
||||
from src.organisation.schemas import Questionnaire
|
||||
from src.schemas import CustomBaseModel, OrgIDMixin
|
||||
|
||||
|
||||
class ContactModel(CustomBaseModel):
|
||||
id: int
|
||||
email: Optional[EmailStr] = None
|
||||
|
||||
|
||||
class OrgSchema(OrgIDMixin):
|
||||
name: str
|
||||
status: Status
|
||||
root_user_email: EmailStr
|
||||
intake_questionnaire: Questionnaire
|
||||
|
||||
billing_contact: ContactModel
|
||||
owner_contact: ContactModel
|
||||
security_contact: ContactModel
|
||||
|
||||
|
||||
class OIDCClaims(CustomBaseModel):
|
||||
exp: int
|
||||
iat: int
|
||||
|
|
@ -54,3 +72,7 @@ class UserPostInvitationRequest(OrgIDMixin):
|
|||
|
||||
class UserPostInvitationAcceptRequest(CustomBaseModel):
|
||||
jwt: str
|
||||
|
||||
|
||||
class UserGetSelfOrgsResponse(CustomBaseModel):
|
||||
organisations: list[OrgSchema]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue