{"openapi":"3.0.0","paths":{"/mothers":{"get":{"operationId":"MothersController_findAll","summary":"List all mothers","description":"Returns all mother records. In this prototype, a mother can be either a group leader or an applicant depending on how the record is later used.","parameters":[],"responses":{"200":{"description":""}},"tags":["mothers"]},"post":{"operationId":"MothersController_create","summary":"Create a mother record","description":"This is the same endpoint for both \"leader mother\" and \"applicant mother\". The difference is only how the created id is used later: leader mothers are referenced by groups.leaderMotherId, while applicant mothers are referenced by applications.motherId and group_memberships.motherId.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMotherDto"}}}},"responses":{"201":{"description":""}},"tags":["mothers"]}},"/mothers/{id}":{"get":{"operationId":"MothersController_findOne","summary":"Get one mother by id","description":"Use this after creating a mother to inspect one specific leader or applicant record.","parameters":[{"name":"id","required":true,"in":"path","description":"Mother id.","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["mothers"]},"patch":{"operationId":"MothersController_update","summary":"Update a mother record","description":"Update profile details for an existing mother record.","parameters":[{"name":"id","required":true,"in":"path","description":"Mother id.","schema":{"example":2,"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMotherDto"}}}},"responses":{"200":{"description":""}},"tags":["mothers"]},"delete":{"operationId":"MothersController_remove","summary":"Delete a mother record","description":"Delete one mother. Run this near the end of testing because mothers are referenced by groups, applications, and memberships.","parameters":[{"name":"id","required":true,"in":"path","description":"Mother id.","schema":{"example":2,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["mothers"]}},"/users":{"get":{"operationId":"UsersController_findAll","summary":"List all users","parameters":[],"responses":{"200":{"description":""}},"tags":["users"]},"post":{"operationId":"UsersController_create","summary":"Create a user","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserDto"}}}},"responses":{"201":{"description":""}},"tags":["users"]}},"/users/{id}":{"get":{"operationId":"UsersController_findOne","summary":"Get one user by id","parameters":[{"name":"id","required":true,"in":"path","description":"User id.","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["users"]},"patch":{"operationId":"UsersController_update","summary":"Update a user","parameters":[{"name":"id","required":true,"in":"path","description":"User id.","schema":{"example":1,"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}}},"responses":{"200":{"description":""}},"tags":["users"]},"delete":{"operationId":"UsersController_remove","summary":"Delete a user","parameters":[{"name":"id","required":true,"in":"path","description":"User id.","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["users"]}},"/groups":{"get":{"operationId":"GroupsController_findAll","summary":"List all groups","description":"Returns all groups with their related leader, meetings, applications, and memberships. This is a good endpoint to demonstrate the overall relational structure.","parameters":[],"responses":{"200":{"description":""}},"tags":["groups"]},"post":{"operationId":"GroupsController_create","summary":"Create a group","description":"Creates a bible study group. leaderMotherId must be an existing mother id, typically the leader mother created earlier in the test flow.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupDto"}}}},"responses":{"201":{"description":""}},"tags":["groups"]}},"/groups/{id}":{"get":{"operationId":"GroupsController_findOne","summary":"Get one group by id","description":"Retrieve a single group and its relationships by id.","parameters":[{"name":"id","required":true,"in":"path","description":"Group id.","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["groups"]},"patch":{"operationId":"GroupsController_update","summary":"Update a group","description":"Update group details such as capacity, description, or location.","parameters":[{"name":"id","required":true,"in":"path","description":"Group id.","schema":{"example":1,"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroupDto"}}}},"responses":{"200":{"description":""}},"tags":["groups"]},"delete":{"operationId":"GroupsController_remove","summary":"Delete a group","description":"Delete one group. Use this near the end of testing because meetings, applications, and memberships depend on the group.","parameters":[{"name":"id","required":true,"in":"path","description":"Group id.","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["groups"]}},"/group-meetings":{"get":{"operationId":"GroupMeetingsController_findAll","summary":"List all group meetings","description":"Returns all meeting records and the group each meeting belongs to.","parameters":[],"responses":{"200":{"description":""}},"tags":["group-meetings"]},"post":{"operationId":"GroupMeetingsController_create","summary":"Create a group meeting","description":"Creates a meeting slot for a group. groupId must be an existing group id created earlier in the test flow.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupMeetingDto"}}}},"responses":{"201":{"description":""}},"tags":["group-meetings"]}},"/group-meetings/{id}":{"get":{"operationId":"GroupMeetingsController_findOne","summary":"Get one group meeting by id","description":"Retrieve a single meeting definition by id.","parameters":[{"name":"id","required":true,"in":"path","description":"Group meeting id.","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["group-meetings"]},"patch":{"operationId":"GroupMeetingsController_update","summary":"Update a group meeting","description":"Update meeting time, day, or location information.","parameters":[{"name":"id","required":true,"in":"path","description":"Group meeting id.","schema":{"example":1,"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroupMeetingDto"}}}},"responses":{"200":{"description":""}},"tags":["group-meetings"]},"delete":{"operationId":"GroupMeetingsController_remove","summary":"Delete a group meeting","description":"Delete one meeting record.","parameters":[{"name":"id","required":true,"in":"path","description":"Group meeting id.","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["group-meetings"]}},"/applications":{"get":{"operationId":"ApplicationsController_findAll","summary":"List all applications","description":"Returns all application records with applicant mother, target group, and optional reviewer mother.","parameters":[],"responses":{"200":{"description":""}},"tags":["applications"]},"post":{"operationId":"ApplicationsController_create","summary":"Create an application","description":"Creates an application for an applicant mother to join a group. motherId should be the applicant mother, groupId should be the target group, and reviewerMotherId can be the leader mother.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApplicationDto"}}}},"responses":{"201":{"description":""}},"tags":["applications"]}},"/applications/{id}":{"get":{"operationId":"ApplicationsController_findOne","summary":"Get one application by id","description":"Retrieve one application record by id.","parameters":[{"name":"id","required":true,"in":"path","description":"Application id.","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["applications"]},"patch":{"operationId":"ApplicationsController_update","summary":"Update an application","description":"Use this to move an application through prototype states such as pending, interview_scheduled, accepted, or rejected.","parameters":[{"name":"id","required":true,"in":"path","description":"Application id.","schema":{"example":1,"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApplicationDto"}}}},"responses":{"200":{"description":""}},"tags":["applications"]},"delete":{"operationId":"ApplicationsController_remove","summary":"Delete an application","description":"Delete one application record.","parameters":[{"name":"id","required":true,"in":"path","description":"Application id.","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["applications"]}},"/group-memberships":{"get":{"operationId":"GroupMembershipsController_findAll","summary":"List all group memberships","description":"Returns all group membership records with their linked mother and group. This shows accepted participants who became members.","parameters":[],"responses":{"200":{"description":""}},"tags":["group-memberships"]},"post":{"operationId":"GroupMembershipsController_create","summary":"Create a group membership","description":"Creates a membership for a mother in a group. In the business flow, this is normally used after the application is accepted.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupMembershipDto"}}}},"responses":{"201":{"description":""}},"tags":["group-memberships"]}},"/group-memberships/{id}":{"get":{"operationId":"GroupMembershipsController_findOne","summary":"Get one group membership by id","description":"Retrieve one membership record by id.","parameters":[{"name":"id","required":true,"in":"path","description":"Group membership id.","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["group-memberships"]},"patch":{"operationId":"GroupMembershipsController_update","summary":"Update a group membership","description":"Update membership status such as active or inactive.","parameters":[{"name":"id","required":true,"in":"path","description":"Group membership id.","schema":{"example":1,"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroupMembershipDto"}}}},"responses":{"200":{"description":""}},"tags":["group-memberships"]},"delete":{"operationId":"GroupMembershipsController_remove","summary":"Delete a group membership","description":"Delete one membership record.","parameters":[{"name":"id","required":true,"in":"path","description":"Group membership id.","schema":{"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["group-memberships"]}}},"info":{"title":"Project Alpha Prototype API","description":"Prototype CRUD API for mothers, groups, meetings, applications, and memberships.","version":"0.1.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"CreateMotherDto":{"type":"object","properties":{"name":{"type":"string","example":"Jane Doe"},"description":{"type":"string","example":"Interested in a weekday morning bible study group."},"email":{"type":"string","example":"jane@example.com"},"phone":{"type":"string","example":"080-111-2222"},"locationPreference":{"type":"string","example":"N"},"availabilityNotes":{"type":"string","example":"Weekday mornings work best."}},"required":["name","email"]},"UpdateMotherDto":{"type":"object","properties":{"name":{"type":"string","example":"Jane Doe"},"description":{"type":"string","example":"Interested in a weekday morning bible study group."},"email":{"type":"string","example":"jane@example.com"},"phone":{"type":"string","example":"080-111-2222"},"locationPreference":{"type":"string","example":"N"},"availabilityNotes":{"type":"string","example":"Weekday mornings work best."}}},"CreateUserDto":{"type":"object","properties":{"name":{"type":"string","example":"Ada Lovelace"},"email":{"type":"string","example":"ada@example.com"}},"required":["name","email"]},"UpdateUserDto":{"type":"object","properties":{"name":{"type":"string","example":"Ada Lovelace"},"email":{"type":"string","example":"ada@example.com"}}},"CreateGroupDto":{"type":"object","properties":{"name":{"type":"string","example":"North Sunrise Group"},"description":{"type":"string","example":"A prototype morning study group."},"leaderMotherId":{"type":"number","example":1},"locationRegion":{"type":"string","example":"N"},"capacity":{"type":"number","example":12}},"required":["name","leaderMotherId","locationRegion"]},"UpdateGroupDto":{"type":"object","properties":{"name":{"type":"string","example":"North Sunrise Group"},"description":{"type":"string","example":"A prototype morning study group."},"leaderMotherId":{"type":"number","example":1},"locationRegion":{"type":"string","example":"N"},"capacity":{"type":"number","example":12}}},"CreateGroupMeetingDto":{"type":"object","properties":{"groupId":{"type":"number","example":1},"name":{"type":"string","example":"Wednesday Gathering"},"description":{"type":"string","example":"Weekly bible study meeting."},"meetingDay":{"type":"string","example":"Wednesday"},"startTime":{"type":"string","example":"09:00"},"endTime":{"type":"string","example":"11:00"},"locationText":{"type":"string","example":"North Community Hall"}},"required":["groupId","name","meetingDay","startTime","endTime"]},"UpdateGroupMeetingDto":{"type":"object","properties":{"groupId":{"type":"number","example":1},"name":{"type":"string","example":"Wednesday Gathering"},"description":{"type":"string","example":"Weekly bible study meeting."},"meetingDay":{"type":"string","example":"Wednesday"},"startTime":{"type":"string","example":"09:00"},"endTime":{"type":"string","example":"11:00"},"locationText":{"type":"string","example":"North Community Hall"}}},"CreateApplicationDto":{"type":"object","properties":{"motherId":{"type":"number","example":2},"groupId":{"type":"number","example":1},"reviewerMotherId":{"type":"number","example":1},"name":{"type":"string","example":"Application for North Sunrise Group"},"description":{"type":"string","example":"Looking for a north-side weekday group."},"status":{"type":"string","example":"pending"},"availabilityNotes":{"type":"string","example":"Can interview next Tuesday."},"interviewScheduledAt":{"format":"date-time","type":"string","example":"2026-04-21T09:00:00.000Z"}},"required":["motherId","groupId","name"]},"UpdateApplicationDto":{"type":"object","properties":{"motherId":{"type":"number","example":2},"groupId":{"type":"number","example":1},"reviewerMotherId":{"type":"number","example":1},"name":{"type":"string","example":"Application for North Sunrise Group"},"description":{"type":"string","example":"Looking for a north-side weekday group."},"status":{"type":"string","example":"accepted"},"availabilityNotes":{"type":"string","example":"Can interview next Tuesday."},"interviewScheduledAt":{"format":"date-time","type":"string","example":"2026-04-21T09:00:00.000Z"}}},"CreateGroupMembershipDto":{"type":"object","properties":{"motherId":{"type":"number","example":2},"groupId":{"type":"number","example":1},"name":{"type":"string","example":"North Sunrise Membership"},"description":{"type":"string","example":"Accepted applicant now active in the group."},"status":{"type":"string","example":"active"},"joinedAt":{"format":"date-time","type":"string","example":"2026-04-22T09:00:00.000Z"}},"required":["motherId","groupId","name"]},"UpdateGroupMembershipDto":{"type":"object","properties":{"motherId":{"type":"number","example":2},"groupId":{"type":"number","example":1},"name":{"type":"string","example":"North Sunrise Membership"},"description":{"type":"string","example":"Accepted applicant now active in the group."},"status":{"type":"string","example":"active"},"joinedAt":{"format":"date-time","type":"string","example":"2026-04-22T09:00:00.000Z"}}}}}}