diff --git a/api/openapi.yaml b/api/openapi.yaml index 92163ec..62d3c70 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -15,7 +15,9 @@ paths: tags: - organization summary: Get all sports - description: Returns a list of all sports registered in the organization. If the caller is not an admin, only sports that the caller is a member of will be returned. + description: | + Returns a list of all sports registered in the organization. + - All authenticated users: can access this endpoint. responses: "200": description: The request was successful, and the server has returned the requested resource in the response body. @@ -39,7 +41,9 @@ paths: tags: - organization summary: Create sport - description: Creates a new sport in the organization. Only admins are allowed to create new sports. + description: | + Creates a new sport in the organization. + - Admins: can create sports. responses: "201": description: The request was successful, and a new resource was created. @@ -72,6 +76,10 @@ paths: tags: - organization summary: Update sport + description: | + Partially updates an existing sport's details. + - Directors: can update all fields except directors. + - Admins: can update all fields. parameters: - $ref: "#/components/parameters/sport_name" responses: @@ -106,6 +114,9 @@ paths: tags: - organization summary: Delete sport + description: | + Deletes a sport from the organization. + - Admins: can delete sports. parameters: - $ref: "#/components/parameters/sport_name" responses: @@ -127,6 +138,9 @@ paths: tags: - organization summary: Get sport + description: | + Returns the details of a specific sport. + - All authenticated users: can access this endpoint. parameters: - $ref: "#/components/parameters/sport_name" responses: @@ -153,6 +167,9 @@ paths: tags: - organization summary: Get all teams + description: | + Returns a list of all teams in the organization. + - All authenticated users: can access this endpoint. responses: "200": description: The request was successful, and the server has returned the @@ -176,6 +193,10 @@ paths: tags: - organization summary: Create team + description: | + Creates a new team in the organization. + - Directors: can create teams for their own sport. + - Admins: can create teams for any sport. responses: "201": description: The request was successful, and a new resource was created. @@ -208,6 +229,9 @@ paths: tags: - organization summary: Get team + description: | + Returns the details of a specific team. + - All authenticated users: can access this endpoint. parameters: - $ref: "#/components/parameters/team_id" responses: @@ -233,6 +257,11 @@ paths: tags: - organization summary: Update team + description: | + Partially updates a team's details. + - Trainers: can update all fields except sport and trainers. + - Directors: can update all fields except sport. + - Admins: can update all fields. parameters: - $ref: "#/components/parameters/team_id" responses: @@ -267,6 +296,10 @@ paths: tags: - organization summary: Delete team + description: | + Deletes a team from the organization. + - Directors: can delete teams in their sport. + - Admins: can delete any team. parameters: - $ref: "#/components/parameters/team_id" responses: @@ -289,6 +322,9 @@ paths: tags: - members summary: Get all members + description: | + Returns a list of all members in the organization. + - All authenticated users: can access this endpoint. responses: "200": description: The request was successful, and the server has returned the @@ -312,6 +348,9 @@ paths: tags: - members summary: Create member + description: | + Creates a new member in the organization. Includes a password field for setting initial credentials. + - Admins: can create members. responses: "201": description: The request was successful, and a new resource was created. @@ -344,6 +383,13 @@ paths: tags: - members summary: Get member details + description: | + Returns the full details of a specific member. + - Members themselves: can view their own details. + - Team members: can view details of others in the same team. + - Trainers: can view details of members in their team. + - Directors: can view details of members in their sport. + - Admins: can view any member's details. parameters: - $ref: "#/components/parameters/member_id" responses: @@ -369,6 +415,10 @@ paths: tags: - members summary: Update member details + description: | + Partially updates the details of a specific member. + - Members themselves: can update their own details. + - Admins: can update any member's details. parameters: - $ref: "#/components/parameters/member_id" responses: @@ -403,6 +453,9 @@ paths: tags: - members summary: Delete member + description: | + Deletes a member from the organization. + - Admins: can delete members. parameters: - $ref: "#/components/parameters/member_id" responses: @@ -425,6 +478,11 @@ paths: tags: - events summary: Get all events + description: | + Returns a list of all events. + - All authenticated users: can see events linked to their team or sport, or events where they are an attendee. + - Creators: can see all events they created. + - Admins: can see all events. responses: "200": description: The request was successful, and the server has returned the @@ -448,6 +506,11 @@ paths: tags: - events summary: Create event + description: | + Creates a new event. + - Directors: can create events for their sport. + - Trainers: can create events for their team. + - Admins: can create any event. responses: "201": description: The request was successful, and a new resource was created. @@ -480,6 +543,11 @@ paths: tags: - events summary: Get event details + description: | + Returns the details of a specific event. + - All authenticated users: can access events linked to their team or sport, or events where they are an attendee. + - Creators: can view events they created. + - Admins: can view any event. parameters: - $ref: "#/components/parameters/event_id" responses: @@ -505,6 +573,11 @@ paths: tags: - events summary: Update event details + description: | + Partially updates the details of a specific event. + - Creators: can update events they created. + - Directors: can update events linked to their sport. + - Admins: can update any event. parameters: - $ref: "#/components/parameters/event_id" responses: @@ -539,6 +612,11 @@ paths: tags: - events summary: Delete event + description: | + Deletes a specific event. + - Creators: can delete events they created. + - Directors: can delete events linked to their sport. + - Admins: can delete any event. parameters: - $ref: "#/components/parameters/event_id" responses: @@ -561,6 +639,11 @@ paths: tags: - feedback summary: Get all feedback + description: | + Returns a list of all feedback entries. + - Creators: can see feedback they submitted. + - Members: can see feedback about themselves. + - Admins: can see all feedback. responses: "200": description: The request was successful, and the server has returned the @@ -584,6 +667,10 @@ paths: tags: - feedback summary: Create feedback + description: | + Creates a new feedback entry for a member. + - Trainers: can create feedback for their trainees. + - Admins: can create feedback for any member. responses: "201": description: The request was successful, and a new resource was created. @@ -616,6 +703,11 @@ paths: tags: - feedback summary: Get feedback details + description: | + Returns the details of a specific feedback entry. + - Creators: can view feedback they submitted. + - Members: can view feedback about themselves. + - Admins: can view any feedback. parameters: - $ref: "#/components/parameters/feedback_id" responses: @@ -641,6 +733,10 @@ paths: tags: - feedback summary: Delete feedback + description: | + Deletes a specific feedback entry. + - Creators: can delete feedback they submitted. + - Admins: can delete any feedback. parameters: - $ref: "#/components/parameters/feedback_id" responses: @@ -662,6 +758,10 @@ paths: tags: - feedback summary: Update feedback details + description: | + Partially updates a specific feedback entry. + - Creators: can update feedback they submitted. + - Admins: can update any feedback. parameters: - $ref: "#/components/parameters/feedback_id" responses: @@ -697,6 +797,10 @@ paths: tags: - finance summary: Get all balances + description: | + Returns a list of all member balances. + - Directors: can view balances of members in their sport. + - Admins: can view all balances. responses: "200": description: The request was successful, and the server has returned the @@ -721,6 +825,11 @@ paths: tags: - finance summary: Get member balance + description: | + Returns the balance of a specific member. + - Members themselves: can view their own balance. + - Directors: can view balances of members in their sport. + - Admins: can view any member's balance. parameters: - $ref: "#/components/parameters/member_id" responses: @@ -747,6 +856,12 @@ paths: tags: - finance summary: Get all transactions + description: | + Returns a list of all transactions. Users only see transactions where they are the member or the creator. + - Members: can see transactions they are part of. + - Creators: can see transactions they created. + - Directors: can see transactions for members in their sport. + - Admins: can see all transactions. responses: "200": description: The request was successful, and the server has returned the @@ -770,6 +885,10 @@ paths: tags: - finance summary: Create transaction + description: | + Creates a new financial transaction for a member. + - Directors: can create transactions for members in their sport. + - Admins: can create transactions for any member. responses: "201": description: The request was successful, and a new resource was created. @@ -802,6 +921,12 @@ paths: tags: - finance summary: Get transaction + description: | + Returns the details of a specific transaction. + - Members: can view transactions they are part of. + - Creators: can view transactions they created. + - Directors: can view transactions for members in their sport. + - Admins: can view any transaction. parameters: - $ref: "#/components/parameters/transaction_id" responses: @@ -827,6 +952,10 @@ paths: tags: - finance summary: Update transaction + description: | + Partially updates a specific transaction. The member field can only be changed by admins. + - Creators: can update transactions they created (except the member field). + - Admins: can update any transaction including the member field. parameters: - $ref: "#/components/parameters/transaction_id" responses: @@ -861,6 +990,10 @@ paths: tags: - finance summary: Delete transaction + description: | + Deletes a specific transaction. + - Creators: can delete transactions they created. + - Admins: can delete any transaction. parameters: - $ref: "#/components/parameters/transaction_id" responses: @@ -883,6 +1016,11 @@ paths: tags: - letters summary: Send mail + description: | + Sends an email based on the provided HTML template. + - Trainers: can send mail to members of their team. + - Directors: can send mail to members related to their sport. + - Admins: can send mail to any member. responses: "204": $ref: "#/components/responses/NoContent" @@ -910,6 +1048,11 @@ paths: tags: - letters summary: Get pdf + description: | + Generates and returns a PDF document from the provided HTML template. + - Trainers: can generate PDFs related to their team. + - Directors: can generate PDFs related to their sport. + - Admins: can generate PDFs related to any member. responses: "200": description: The request was successful, and the server has returned the @@ -943,6 +1086,11 @@ paths: tags: - helper summary: Generate report + description: | + Generates an AI-based report for a member. Members can only generate reports for themselves. + - All authenticated users: can generate a report for themselves. + - Trainers: can generate reports for members of their team. + - Admin: can generate a report for any member. responses: "200": description: The request was successful, and the server has returned the @@ -1284,6 +1432,9 @@ components: type: string email: type: string + password: + type: string + format: password birthday: type: string format: date @@ -1297,6 +1448,7 @@ components: - first_name - last_name - email + - password description: Data transfer object for creating a new Member. Event: type: object diff --git a/services/py-genai-helper/generated/models.py b/services/py-genai-helper/generated/models.py index 5b07de0..65b8b3b 100644 --- a/services/py-genai-helper/generated/models.py +++ b/services/py-genai-helper/generated/models.py @@ -1,9 +1,9 @@ # generated by datamodel-codegen: # filename: openapi.yaml -# timestamp: 2026-06-12T12:58:15+00:00 +# timestamp: 2026-06-18T08:03:34+00:00 from __future__ import annotations -from pydantic import AwareDatetime, BaseModel, Field +from pydantic import AwareDatetime, BaseModel, Field, SecretStr from datetime import date from uuid import UUID from typing import Annotated @@ -99,6 +99,7 @@ class MemberCreate(BaseModel): first_name: str last_name: str email: str + password: SecretStr birthday: date | None = None phone_number: str | None = None address: str | None = None diff --git a/services/spring-event/src/generated/java/tum/devoops/eventservice/api/EventsApi.java b/services/spring-event/src/generated/java/tum/devoops/eventservice/api/EventsApi.java index ed7d69c..8567f1f 100644 --- a/services/spring-event/src/generated/java/tum/devoops/eventservice/api/EventsApi.java +++ b/services/spring-event/src/generated/java/tum/devoops/eventservice/api/EventsApi.java @@ -51,6 +51,7 @@ default Optional getRequest() { /** * POST /events : Create event + * Creates a new event. - Directors: can create events for their sport. - Trainers: can create events for their team. - Admins: can create any event. * * @param eventCreate The request body for creating a new event. (required) * @return The request was successful, and a new resource was created. (status code 201) @@ -63,6 +64,7 @@ default Optional getRequest() { @Operation( operationId = "createEvent", summary = "Create event", + description = "Creates a new event. - Directors: can create events for their sport. - Trainers: can create events for their team. - Admins: can create any event. ", tags = { "events" }, responses = { @ApiResponse(responseCode = "201", description = "The request was successful, and a new resource was created.", content = { @@ -139,6 +141,7 @@ default ResponseEntity createEvent( /** * DELETE /events/{event_id} : Delete event + * Deletes a specific event. - Creators: can delete events they created. - Directors: can delete events linked to their sport. - Admins: can delete any event. * * @param eventId (required) * @return The request was successful, but there is no content to return in the response. (status code 204) @@ -150,6 +153,7 @@ default ResponseEntity createEvent( @Operation( operationId = "deleteEvent", summary = "Delete event", + description = "Deletes a specific event. - Creators: can delete events they created. - Directors: can delete events linked to their sport. - Admins: can delete any event. ", tags = { "events" }, responses = { @ApiResponse(responseCode = "204", description = "The request was successful, but there is no content to return in the response."), @@ -210,6 +214,7 @@ default ResponseEntity deleteEvent( /** * GET /events : Get all events + * Returns a list of all events. - All authenticated users: can see events linked to their team or sport, or events where they are an attendee. - Creators: can see all events they created. - Admins: can see all events. * * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) * or Authentication is required to access the requested resource. The client must include the appropriate credentials. (status code 401) @@ -219,6 +224,7 @@ default ResponseEntity deleteEvent( @Operation( operationId = "getAllEvents", summary = "Get all events", + description = "Returns a list of all events. - All authenticated users: can see events linked to their team or sport, or events where they are an attendee. - Creators: can see all events they created. - Admins: can see all events. ", tags = { "events" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -278,6 +284,7 @@ default ResponseEntity> getAllEvents( /** * GET /events/{event_id} : Get event details + * Returns the details of a specific event. - All authenticated users: can access events linked to their team or sport, or events where they are an attendee. - Creators: can view events they created. - Admins: can view any event. * * @param eventId (required) * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) @@ -289,6 +296,7 @@ default ResponseEntity> getAllEvents( @Operation( operationId = "getEventDetails", summary = "Get event details", + description = "Returns the details of a specific event. - All authenticated users: can access events linked to their team or sport, or events where they are an attendee. - Creators: can view events they created. - Admins: can view any event. ", tags = { "events" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -356,6 +364,7 @@ default ResponseEntity getEventDetails( /** * PATCH /events/{event_id} : Update event details + * Partially updates the details of a specific event. - Creators: can update events they created. - Directors: can update events linked to their sport. - Admins: can update any event. * * @param eventId (required) * @param eventPartialUpdate The request body for partially updating an event. (required) @@ -369,6 +378,7 @@ default ResponseEntity getEventDetails( @Operation( operationId = "updateEventDetails", summary = "Update event details", + description = "Partially updates the details of a specific event. - Creators: can update events they created. - Directors: can update events linked to their sport. - Admins: can update any event. ", tags = { "events" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { diff --git a/services/spring-feedback/src/generated/java/tum/devoops/feedbackservice/api/FeedbackApi.java b/services/spring-feedback/src/generated/java/tum/devoops/feedbackservice/api/FeedbackApi.java index 8b87aef..03ecfe3 100644 --- a/services/spring-feedback/src/generated/java/tum/devoops/feedbackservice/api/FeedbackApi.java +++ b/services/spring-feedback/src/generated/java/tum/devoops/feedbackservice/api/FeedbackApi.java @@ -51,6 +51,7 @@ default Optional getRequest() { /** * POST /feedback : Create feedback + * Creates a new feedback entry for a member. - Trainers: can create feedback for their trainees. - Admins: can create feedback for any member. * * @param feedbackCreate The request body for creating new feedback. (required) * @return The request was successful, and a new resource was created. (status code 201) @@ -63,6 +64,7 @@ default Optional getRequest() { @Operation( operationId = "createFeedback", summary = "Create feedback", + description = "Creates a new feedback entry for a member. - Trainers: can create feedback for their trainees. - Admins: can create feedback for any member. ", tags = { "feedback" }, responses = { @ApiResponse(responseCode = "201", description = "The request was successful, and a new resource was created.", content = { @@ -139,6 +141,7 @@ default ResponseEntity createFeedback( /** * DELETE /feedback/{feedback_id} : Delete feedback + * Deletes a specific feedback entry. - Creators: can delete feedback they submitted. - Admins: can delete any feedback. * * @param feedbackId (required) * @return The request was successful, but there is no content to return in the response. (status code 204) @@ -150,6 +153,7 @@ default ResponseEntity createFeedback( @Operation( operationId = "deleteFeedback", summary = "Delete feedback", + description = "Deletes a specific feedback entry. - Creators: can delete feedback they submitted. - Admins: can delete any feedback. ", tags = { "feedback" }, responses = { @ApiResponse(responseCode = "204", description = "The request was successful, but there is no content to return in the response."), @@ -210,6 +214,7 @@ default ResponseEntity deleteFeedback( /** * GET /feedback : Get all feedback + * Returns a list of all feedback entries. - Creators: can see feedback they submitted. - Members: can see feedback about themselves. - Admins: can see all feedback. * * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) * or Authentication is required to access the requested resource. The client must include the appropriate credentials. (status code 401) @@ -219,6 +224,7 @@ default ResponseEntity deleteFeedback( @Operation( operationId = "getAllFeedback", summary = "Get all feedback", + description = "Returns a list of all feedback entries. - Creators: can see feedback they submitted. - Members: can see feedback about themselves. - Admins: can see all feedback. ", tags = { "feedback" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -278,6 +284,7 @@ default ResponseEntity> getAllFeedback( /** * GET /feedback/{feedback_id} : Get feedback details + * Returns the details of a specific feedback entry. - Creators: can view feedback they submitted. - Members: can view feedback about themselves. - Admins: can view any feedback. * * @param feedbackId (required) * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) @@ -289,6 +296,7 @@ default ResponseEntity> getAllFeedback( @Operation( operationId = "getFeedbackDetails", summary = "Get feedback details", + description = "Returns the details of a specific feedback entry. - Creators: can view feedback they submitted. - Members: can view feedback about themselves. - Admins: can view any feedback. ", tags = { "feedback" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -356,6 +364,7 @@ default ResponseEntity getFeedbackDetails( /** * PATCH /feedback/{feedback_id} : Update feedback details + * Partially updates a specific feedback entry. - Creators: can update feedback they submitted. - Admins: can update any feedback. * * @param feedbackId (required) * @param feedbackPartialUpdate The request body for partially updating a specific feedback. (required) @@ -369,6 +378,7 @@ default ResponseEntity getFeedbackDetails( @Operation( operationId = "updateFeedbackDetails", summary = "Update feedback details", + description = "Partially updates a specific feedback entry. - Creators: can update feedback they submitted. - Admins: can update any feedback. ", tags = { "feedback" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { diff --git a/services/spring-finance/src/generated/java/tum/devoops/financeservice/api/FinanceApi.java b/services/spring-finance/src/generated/java/tum/devoops/financeservice/api/FinanceApi.java index 14c0dda..26dd235 100644 --- a/services/spring-finance/src/generated/java/tum/devoops/financeservice/api/FinanceApi.java +++ b/services/spring-finance/src/generated/java/tum/devoops/financeservice/api/FinanceApi.java @@ -51,6 +51,7 @@ default Optional getRequest() { /** * POST /finance/transactions : Create transaction + * Creates a new financial transaction for a member. - Directors: can create transactions for members in their sport. - Admins: can create transactions for any member. * * @param transactionCreate The request body for creating a new transaction. (required) * @return The request was successful, and a new resource was created. (status code 201) @@ -63,6 +64,7 @@ default Optional getRequest() { @Operation( operationId = "createTransaction", summary = "Create transaction", + description = "Creates a new financial transaction for a member. - Directors: can create transactions for members in their sport. - Admins: can create transactions for any member. ", tags = { "finance" }, responses = { @ApiResponse(responseCode = "201", description = "The request was successful, and a new resource was created.", content = { @@ -139,6 +141,7 @@ default ResponseEntity createTransaction( /** * DELETE /finance/transactions/{transaction_id} : Delete transaction + * Deletes a specific transaction. - Creators: can delete transactions they created. - Admins: can delete any transaction. * * @param transactionId (required) * @return The request was successful, but there is no content to return in the response. (status code 204) @@ -150,6 +153,7 @@ default ResponseEntity createTransaction( @Operation( operationId = "deleteTransaction", summary = "Delete transaction", + description = "Deletes a specific transaction. - Creators: can delete transactions they created. - Admins: can delete any transaction. ", tags = { "finance" }, responses = { @ApiResponse(responseCode = "204", description = "The request was successful, but there is no content to return in the response."), @@ -210,6 +214,7 @@ default ResponseEntity deleteTransaction( /** * GET /finance/balances : Get all balances + * Returns a list of all member balances. - Directors: can view balances of members in their sport. - Admins: can view all balances. * * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) * or Authentication is required to access the requested resource. The client must include the appropriate credentials. (status code 401) @@ -219,6 +224,7 @@ default ResponseEntity deleteTransaction( @Operation( operationId = "getAllBalances", summary = "Get all balances", + description = "Returns a list of all member balances. - Directors: can view balances of members in their sport. - Admins: can view all balances. ", tags = { "finance" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -278,6 +284,7 @@ default ResponseEntity> getAllBalances( /** * GET /finance/transactions : Get all transactions + * Returns a list of all transactions. Users only see transactions where they are the member or the creator. - Members: can see transactions they are part of. - Creators: can see transactions they created. - Directors: can see transactions for members in their sport. - Admins: can see all transactions. * * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) * or Authentication is required to access the requested resource. The client must include the appropriate credentials. (status code 401) @@ -287,6 +294,7 @@ default ResponseEntity> getAllBalances( @Operation( operationId = "getAllTransactions", summary = "Get all transactions", + description = "Returns a list of all transactions. Users only see transactions where they are the member or the creator. - Members: can see transactions they are part of. - Creators: can see transactions they created. - Directors: can see transactions for members in their sport. - Admins: can see all transactions. ", tags = { "finance" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -346,6 +354,7 @@ default ResponseEntity> getAllTransactions( /** * GET /finance/balances/{member_id} : Get member balance + * Returns the balance of a specific member. - Members themselves: can view their own balance. - Directors: can view balances of members in their sport. - Admins: can view any member's balance. * * @param memberId (required) * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) @@ -357,6 +366,7 @@ default ResponseEntity> getAllTransactions( @Operation( operationId = "getMemberBalance", summary = "Get member balance", + description = "Returns the balance of a specific member. - Members themselves: can view their own balance. - Directors: can view balances of members in their sport. - Admins: can view any member's balance. ", tags = { "finance" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -424,6 +434,7 @@ default ResponseEntity getMemberBalance( /** * GET /finance/transactions/{transaction_id} : Get transaction + * Returns the details of a specific transaction. - Members: can view transactions they are part of. - Creators: can view transactions they created. - Directors: can view transactions for members in their sport. - Admins: can view any transaction. * * @param transactionId (required) * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) @@ -435,6 +446,7 @@ default ResponseEntity getMemberBalance( @Operation( operationId = "getTransaction", summary = "Get transaction", + description = "Returns the details of a specific transaction. - Members: can view transactions they are part of. - Creators: can view transactions they created. - Directors: can view transactions for members in their sport. - Admins: can view any transaction. ", tags = { "finance" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -502,6 +514,7 @@ default ResponseEntity getTransaction( /** * PATCH /finance/transactions/{transaction_id} : Update transaction + * Partially updates a specific transaction. The member field can only be changed by admins. - Creators: can update transactions they created (except the member field). - Admins: can update any transaction including the member field. * * @param transactionId (required) * @param transactionPartialUpdate The request body for partially updating a transaction. (required) @@ -515,6 +528,7 @@ default ResponseEntity getTransaction( @Operation( operationId = "updateTransaction", summary = "Update transaction", + description = "Partially updates a specific transaction. The member field can only be changed by admins. - Creators: can update transactions they created (except the member field). - Admins: can update any transaction including the member field. ", tags = { "finance" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { diff --git a/services/spring-letter/src/generated/java/tum/devoops/letterservice/api/LettersApi.java b/services/spring-letter/src/generated/java/tum/devoops/letterservice/api/LettersApi.java index 44886ba..57d5639 100644 --- a/services/spring-letter/src/generated/java/tum/devoops/letterservice/api/LettersApi.java +++ b/services/spring-letter/src/generated/java/tum/devoops/letterservice/api/LettersApi.java @@ -46,6 +46,7 @@ default Optional getRequest() { /** * POST /letters/pdf : Get pdf + * Generates and returns a PDF document from the provided HTML template. - Trainers: can generate PDFs related to their team. - Directors: can generate PDFs related to their sport. - Admins: can generate PDFs related to any member. * * @param body The request body for generating a pdf from a template. It must be a valid HTML string using the template format with placeholders for dynamic content. (required) * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) @@ -57,6 +58,7 @@ default Optional getRequest() { @Operation( operationId = "getPdf", summary = "Get pdf", + description = "Generates and returns a PDF document from the provided HTML template. - Trainers: can generate PDFs related to their team. - Directors: can generate PDFs related to their sport. - Admins: can generate PDFs related to any member. ", tags = { "letters" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -125,6 +127,7 @@ default ResponseEntity getPdf( /** * POST /letters/mail : Send mail + * Sends an email based on the provided HTML template. - Trainers: can send mail to members of their team. - Directors: can send mail to members related to their sport. - Admins: can send mail to any member. * * @param body The request body for sending mail. It will be used in the email content. It must be a valid HTML string using the template format with placeholders for dynamic content. (required) * @return The request was successful, but there is no content to return in the response. (status code 204) @@ -136,6 +139,7 @@ default ResponseEntity getPdf( @Operation( operationId = "sendMail", summary = "Send mail", + description = "Sends an email based on the provided HTML template. - Trainers: can send mail to members of their team. - Directors: can send mail to members related to their sport. - Admins: can send mail to any member. ", tags = { "letters" }, responses = { @ApiResponse(responseCode = "204", description = "The request was successful, but there is no content to return in the response."), diff --git a/services/spring-member/src/generated/java/tum/devoops/memberservice/api/MembersApi.java b/services/spring-member/src/generated/java/tum/devoops/memberservice/api/MembersApi.java index cebbf57..9f7a8e6 100644 --- a/services/spring-member/src/generated/java/tum/devoops/memberservice/api/MembersApi.java +++ b/services/spring-member/src/generated/java/tum/devoops/memberservice/api/MembersApi.java @@ -51,6 +51,7 @@ default Optional getRequest() { /** * POST /members : Create member + * Creates a new member in the organization. Includes a password field for setting initial credentials. - Admins: can create members. * * @param memberCreate The request body for creating a new member. (required) * @return The request was successful, and a new resource was created. (status code 201) @@ -63,6 +64,7 @@ default Optional getRequest() { @Operation( operationId = "createMember", summary = "Create member", + description = "Creates a new member in the organization. Includes a password field for setting initial credentials. - Admins: can create members. ", tags = { "members" }, responses = { @ApiResponse(responseCode = "201", description = "The request was successful, and a new resource was created.", content = { @@ -139,6 +141,7 @@ default ResponseEntity createMember( /** * DELETE /members/{member_id} : Delete member + * Deletes a member from the organization. - Admins: can delete members. * * @param memberId (required) * @return The request was successful, but there is no content to return in the response. (status code 204) @@ -150,6 +153,7 @@ default ResponseEntity createMember( @Operation( operationId = "deleteMember", summary = "Delete member", + description = "Deletes a member from the organization. - Admins: can delete members. ", tags = { "members" }, responses = { @ApiResponse(responseCode = "204", description = "The request was successful, but there is no content to return in the response."), @@ -210,6 +214,7 @@ default ResponseEntity deleteMember( /** * GET /members : Get all members + * Returns a list of all members in the organization. - All authenticated users: can access this endpoint. * * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) * or Authentication is required to access the requested resource. The client must include the appropriate credentials. (status code 401) @@ -219,6 +224,7 @@ default ResponseEntity deleteMember( @Operation( operationId = "getAllMembers", summary = "Get all members", + description = "Returns a list of all members in the organization. - All authenticated users: can access this endpoint. ", tags = { "members" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -278,6 +284,7 @@ default ResponseEntity> getAllMembers( /** * GET /members/{member_id} : Get member details + * Returns the full details of a specific member. - Members themselves: can view their own details. - Team members: can view details of others in the same team. - Trainers: can view details of members in their team. - Directors: can view details of members in their sport. - Admins: can view any member's details. * * @param memberId (required) * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) @@ -289,6 +296,7 @@ default ResponseEntity> getAllMembers( @Operation( operationId = "getMemberDetails", summary = "Get member details", + description = "Returns the full details of a specific member. - Members themselves: can view their own details. - Team members: can view details of others in the same team. - Trainers: can view details of members in their team. - Directors: can view details of members in their sport. - Admins: can view any member's details. ", tags = { "members" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -356,6 +364,7 @@ default ResponseEntity getMemberDetails( /** * PATCH /members/{member_id} : Update member details + * Partially updates the details of a specific member. - Members themselves: can update their own details. - Admins: can update any member's details. * * @param memberId (required) * @param memberPartialUpdate The request body for partially updating a member. (required) @@ -369,6 +378,7 @@ default ResponseEntity getMemberDetails( @Operation( operationId = "updateMemberDetails", summary = "Update member details", + description = "Partially updates the details of a specific member. - Members themselves: can update their own details. - Admins: can update any member's details. ", tags = { "members" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { diff --git a/services/spring-member/src/generated/java/tum/devoops/memberservice/model/MemberCreate.java b/services/spring-member/src/generated/java/tum/devoops/memberservice/model/MemberCreate.java index c4c2cac..561edbe 100644 --- a/services/spring-member/src/generated/java/tum/devoops/memberservice/model/MemberCreate.java +++ b/services/spring-member/src/generated/java/tum/devoops/memberservice/model/MemberCreate.java @@ -30,6 +30,8 @@ public class MemberCreate { private String email; + private String password; + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private @Nullable LocalDate birthday; @@ -46,10 +48,11 @@ public MemberCreate() { /** * Constructor with only required parameters */ - public MemberCreate(String firstName, String lastName, String email) { + public MemberCreate(String firstName, String lastName, String email, String password) { this.firstName = firstName; this.lastName = lastName; this.email = email; + this.password = password; } public MemberCreate firstName(String firstName) { @@ -112,6 +115,26 @@ public void setEmail(String email) { this.email = email; } + public MemberCreate password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @NotNull + @Schema(name = "password", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("password") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + public MemberCreate birthday(@Nullable LocalDate birthday) { this.birthday = birthday; return this; @@ -204,6 +227,7 @@ public boolean equals(Object o) { return Objects.equals(this.firstName, memberCreate.firstName) && Objects.equals(this.lastName, memberCreate.lastName) && Objects.equals(this.email, memberCreate.email) && + Objects.equals(this.password, memberCreate.password) && Objects.equals(this.birthday, memberCreate.birthday) && Objects.equals(this.phoneNumber, memberCreate.phoneNumber) && Objects.equals(this.address, memberCreate.address) && @@ -212,7 +236,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(firstName, lastName, email, birthday, phoneNumber, address, information); + return Objects.hash(firstName, lastName, email, password, birthday, phoneNumber, address, information); } @Override @@ -222,6 +246,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append("*").append("\n"); sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); diff --git a/services/spring-organization/src/generated/java/tum/devoops/organizationservice/api/OrganizationApi.java b/services/spring-organization/src/generated/java/tum/devoops/organizationservice/api/OrganizationApi.java index f1e864b..bc0c48a 100644 --- a/services/spring-organization/src/generated/java/tum/devoops/organizationservice/api/OrganizationApi.java +++ b/services/spring-organization/src/generated/java/tum/devoops/organizationservice/api/OrganizationApi.java @@ -53,7 +53,7 @@ default Optional getRequest() { /** * POST /organization/sports : Create sport - * Creates a new sport in the organization. Only admins are allowed to create new sports. + * Creates a new sport in the organization. - Admins: can create sports. * * @param sportCreate The request body for creating a new sport. (required) * @return The request was successful, and a new resource was created. (status code 201) @@ -66,7 +66,7 @@ default Optional getRequest() { @Operation( operationId = "createSport", summary = "Create sport", - description = "Creates a new sport in the organization. Only admins are allowed to create new sports.", + description = "Creates a new sport in the organization. - Admins: can create sports. ", tags = { "organization" }, responses = { @ApiResponse(responseCode = "201", description = "The request was successful, and a new resource was created.", content = { @@ -143,6 +143,7 @@ default ResponseEntity createSport( /** * POST /organization/teams : Create team + * Creates a new team in the organization. - Directors: can create teams for their own sport. - Admins: can create teams for any sport. * * @param teamCreate The request body for creating a new team. (required) * @return The request was successful, and a new resource was created. (status code 201) @@ -155,6 +156,7 @@ default ResponseEntity createSport( @Operation( operationId = "createTeam", summary = "Create team", + description = "Creates a new team in the organization. - Directors: can create teams for their own sport. - Admins: can create teams for any sport. ", tags = { "organization" }, responses = { @ApiResponse(responseCode = "201", description = "The request was successful, and a new resource was created.", content = { @@ -231,6 +233,7 @@ default ResponseEntity createTeam( /** * DELETE /organization/sports/{sport_name} : Delete sport + * Deletes a sport from the organization. - Admins: can delete sports. * * @param sportName (required) * @return The request was successful, but there is no content to return in the response. (status code 204) @@ -242,6 +245,7 @@ default ResponseEntity createTeam( @Operation( operationId = "deleteSport", summary = "Delete sport", + description = "Deletes a sport from the organization. - Admins: can delete sports. ", tags = { "organization" }, responses = { @ApiResponse(responseCode = "204", description = "The request was successful, but there is no content to return in the response."), @@ -302,6 +306,7 @@ default ResponseEntity deleteSport( /** * DELETE /organization/teams/{team_id} : Delete team + * Deletes a team from the organization. - Directors: can delete teams in their sport. - Admins: can delete any team. * * @param teamId (required) * @return The request was successful, but there is no content to return in the response. (status code 204) @@ -313,6 +318,7 @@ default ResponseEntity deleteSport( @Operation( operationId = "deleteTeam", summary = "Delete team", + description = "Deletes a team from the organization. - Directors: can delete teams in their sport. - Admins: can delete any team. ", tags = { "organization" }, responses = { @ApiResponse(responseCode = "204", description = "The request was successful, but there is no content to return in the response."), @@ -373,7 +379,7 @@ default ResponseEntity deleteTeam( /** * GET /organization/sports : Get all sports - * Returns a list of all sports registered in the organization. If the caller is not an admin, only sports that the caller is a member of will be returned. + * Returns a list of all sports registered in the organization. - All authenticated users: can access this endpoint. * * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) * or Authentication is required to access the requested resource. The client must include the appropriate credentials. (status code 401) @@ -383,7 +389,7 @@ default ResponseEntity deleteTeam( @Operation( operationId = "getAllSports", summary = "Get all sports", - description = "Returns a list of all sports registered in the organization. If the caller is not an admin, only sports that the caller is a member of will be returned.", + description = "Returns a list of all sports registered in the organization. - All authenticated users: can access this endpoint. ", tags = { "organization" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -443,6 +449,7 @@ default ResponseEntity> getAllSports( /** * GET /organization/teams : Get all teams + * Returns a list of all teams in the organization. - All authenticated users: can access this endpoint. * * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) * or Authentication is required to access the requested resource. The client must include the appropriate credentials. (status code 401) @@ -452,6 +459,7 @@ default ResponseEntity> getAllSports( @Operation( operationId = "getAllTeams", summary = "Get all teams", + description = "Returns a list of all teams in the organization. - All authenticated users: can access this endpoint. ", tags = { "organization" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -511,6 +519,7 @@ default ResponseEntity> getAllTeams( /** * GET /organization/sports/{sport_name} : Get sport + * Returns the details of a specific sport. - All authenticated users: can access this endpoint. * * @param sportName (required) * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) @@ -522,6 +531,7 @@ default ResponseEntity> getAllTeams( @Operation( operationId = "getSport", summary = "Get sport", + description = "Returns the details of a specific sport. - All authenticated users: can access this endpoint. ", tags = { "organization" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -589,6 +599,7 @@ default ResponseEntity getSport( /** * GET /organization/teams/{team_id} : Get team + * Returns the details of a specific team. - All authenticated users: can access this endpoint. * * @param teamId (required) * @return The request was successful, and the server has returned the requested resource in the response body. (status code 200) @@ -600,6 +611,7 @@ default ResponseEntity getSport( @Operation( operationId = "getTeam", summary = "Get team", + description = "Returns the details of a specific team. - All authenticated users: can access this endpoint. ", tags = { "organization" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -667,6 +679,7 @@ default ResponseEntity getTeam( /** * PATCH /organization/sports/{sport_name} : Update sport + * Partially updates an existing sport's details. - Directors: can update all fields except directors. - Admins: can update all fields. * * @param sportName (required) * @param sportPartialUpdate The request body for partially updating a sport. (required) @@ -680,6 +693,7 @@ default ResponseEntity getTeam( @Operation( operationId = "updateSport", summary = "Update sport", + description = "Partially updates an existing sport's details. - Directors: can update all fields except directors. - Admins: can update all fields. ", tags = { "organization" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { @@ -757,6 +771,7 @@ default ResponseEntity updateSport( /** * PATCH /organization/teams/{team_id} : Update team + * Partially updates a team's details. - Trainers: can update all fields except sport and trainers. - Directors: can update all fields except sport. - Admins: can update all fields. * * @param teamId (required) * @param teamPartialUpdate The request body for partially updating a team. (required) @@ -770,6 +785,7 @@ default ResponseEntity updateSport( @Operation( operationId = "updateTeam", summary = "Update team", + description = "Partially updates a team's details. - Trainers: can update all fields except sport and trainers. - Directors: can update all fields except sport. - Admins: can update all fields. ", tags = { "organization" }, responses = { @ApiResponse(responseCode = "200", description = "The request was successful, and the server has returned the requested resource in the response body.", content = { diff --git a/web-client/src/api.ts b/web-client/src/api.ts index b4a6582..1e23e85 100644 --- a/web-client/src/api.ts +++ b/web-client/src/api.ts @@ -13,13 +13,15 @@ export interface paths { }; /** * Get all sports - * @description Returns a list of all sports registered in the organization. If the caller is not an admin, only sports that the caller is a member of will be returned. + * @description Returns a list of all sports registered in the organization. + * - All authenticated users: can access this endpoint. */ get: operations["getAllSports"]; put?: never; /** * Create sport - * @description Creates a new sport in the organization. Only admins are allowed to create new sports. + * @description Creates a new sport in the organization. + * - Admins: can create sports. */ post: operations["createSport"]; delete?: never; @@ -35,15 +37,28 @@ export interface paths { path?: never; cookie?: never; }; - /** Get sport */ + /** + * Get sport + * @description Returns the details of a specific sport. + * - All authenticated users: can access this endpoint. + */ get: operations["getSport"]; put?: never; post?: never; - /** Delete sport */ + /** + * Delete sport + * @description Deletes a sport from the organization. + * - Admins: can delete sports. + */ delete: operations["deleteSport"]; options?: never; head?: never; - /** Update sport */ + /** + * Update sport + * @description Partially updates an existing sport's details. + * - Directors: can update all fields except directors. + * - Admins: can update all fields. + */ patch: operations["updateSport"]; trace?: never; }; @@ -54,10 +69,19 @@ export interface paths { path?: never; cookie?: never; }; - /** Get all teams */ + /** + * Get all teams + * @description Returns a list of all teams in the organization. + * - All authenticated users: can access this endpoint. + */ get: operations["getAllTeams"]; put?: never; - /** Create team */ + /** + * Create team + * @description Creates a new team in the organization. + * - Directors: can create teams for their own sport. + * - Admins: can create teams for any sport. + */ post: operations["createTeam"]; delete?: never; options?: never; @@ -72,15 +96,30 @@ export interface paths { path?: never; cookie?: never; }; - /** Get team */ + /** + * Get team + * @description Returns the details of a specific team. + * - All authenticated users: can access this endpoint. + */ get: operations["getTeam"]; put?: never; post?: never; - /** Delete team */ + /** + * Delete team + * @description Deletes a team from the organization. + * - Directors: can delete teams in their sport. + * - Admins: can delete any team. + */ delete: operations["deleteTeam"]; options?: never; head?: never; - /** Update team */ + /** + * Update team + * @description Partially updates a team's details. + * - Trainers: can update all fields except sport and trainers. + * - Directors: can update all fields except sport. + * - Admins: can update all fields. + */ patch: operations["updateTeam"]; trace?: never; }; @@ -91,10 +130,18 @@ export interface paths { path?: never; cookie?: never; }; - /** Get all members */ + /** + * Get all members + * @description Returns a list of all members in the organization. + * - All authenticated users: can access this endpoint. + */ get: operations["getAllMembers"]; put?: never; - /** Create member */ + /** + * Create member + * @description Creates a new member in the organization. Includes a password field for setting initial credentials. + * - Admins: can create members. + */ post: operations["createMember"]; delete?: never; options?: never; @@ -109,15 +156,32 @@ export interface paths { path?: never; cookie?: never; }; - /** Get member details */ + /** + * Get member details + * @description Returns the full details of a specific member. + * - Members themselves: can view their own details. + * - Team members: can view details of others in the same team. + * - Trainers: can view details of members in their team. + * - Directors: can view details of members in their sport. + * - Admins: can view any member's details. + */ get: operations["getMemberDetails"]; put?: never; post?: never; - /** Delete member */ + /** + * Delete member + * @description Deletes a member from the organization. + * - Admins: can delete members. + */ delete: operations["deleteMember"]; options?: never; head?: never; - /** Update member details */ + /** + * Update member details + * @description Partially updates the details of a specific member. + * - Members themselves: can update their own details. + * - Admins: can update any member's details. + */ patch: operations["updateMemberDetails"]; trace?: never; }; @@ -128,10 +192,22 @@ export interface paths { path?: never; cookie?: never; }; - /** Get all events */ + /** + * Get all events + * @description Returns a list of all events. + * - All authenticated users: can see events linked to their team or sport, or events where they are an attendee. + * - Creators: can see all events they created. + * - Admins: can see all events. + */ get: operations["getAllEvents"]; put?: never; - /** Create event */ + /** + * Create event + * @description Creates a new event. + * - Directors: can create events for their sport. + * - Trainers: can create events for their team. + * - Admins: can create any event. + */ post: operations["createEvent"]; delete?: never; options?: never; @@ -146,15 +222,33 @@ export interface paths { path?: never; cookie?: never; }; - /** Get event details */ + /** + * Get event details + * @description Returns the details of a specific event. + * - All authenticated users: can access events linked to their team or sport, or events where they are an attendee. + * - Creators: can view events they created. + * - Admins: can view any event. + */ get: operations["getEventDetails"]; put?: never; post?: never; - /** Delete event */ + /** + * Delete event + * @description Deletes a specific event. + * - Creators: can delete events they created. + * - Directors: can delete events linked to their sport. + * - Admins: can delete any event. + */ delete: operations["deleteEvent"]; options?: never; head?: never; - /** Update event details */ + /** + * Update event details + * @description Partially updates the details of a specific event. + * - Creators: can update events they created. + * - Directors: can update events linked to their sport. + * - Admins: can update any event. + */ patch: operations["updateEventDetails"]; trace?: never; }; @@ -165,10 +259,21 @@ export interface paths { path?: never; cookie?: never; }; - /** Get all feedback */ + /** + * Get all feedback + * @description Returns a list of all feedback entries. + * - Creators: can see feedback they submitted. + * - Members: can see feedback about themselves. + * - Admins: can see all feedback. + */ get: operations["getAllFeedback"]; put?: never; - /** Create feedback */ + /** + * Create feedback + * @description Creates a new feedback entry for a member. + * - Trainers: can create feedback for their trainees. + * - Admins: can create feedback for any member. + */ post: operations["createFeedback"]; delete?: never; options?: never; @@ -183,15 +288,31 @@ export interface paths { path?: never; cookie?: never; }; - /** Get feedback details */ + /** + * Get feedback details + * @description Returns the details of a specific feedback entry. + * - Creators: can view feedback they submitted. + * - Members: can view feedback about themselves. + * - Admins: can view any feedback. + */ get: operations["getFeedbackDetails"]; put?: never; post?: never; - /** Delete feedback */ + /** + * Delete feedback + * @description Deletes a specific feedback entry. + * - Creators: can delete feedback they submitted. + * - Admins: can delete any feedback. + */ delete: operations["deleteFeedback"]; options?: never; head?: never; - /** Update feedback details */ + /** + * Update feedback details + * @description Partially updates a specific feedback entry. + * - Creators: can update feedback they submitted. + * - Admins: can update any feedback. + */ patch: operations["updateFeedbackDetails"]; trace?: never; }; @@ -202,7 +323,12 @@ export interface paths { path?: never; cookie?: never; }; - /** Get all balances */ + /** + * Get all balances + * @description Returns a list of all member balances. + * - Directors: can view balances of members in their sport. + * - Admins: can view all balances. + */ get: operations["getAllBalances"]; put?: never; post?: never; @@ -219,7 +345,13 @@ export interface paths { path?: never; cookie?: never; }; - /** Get member balance */ + /** + * Get member balance + * @description Returns the balance of a specific member. + * - Members themselves: can view their own balance. + * - Directors: can view balances of members in their sport. + * - Admins: can view any member's balance. + */ get: operations["getMemberBalance"]; put?: never; post?: never; @@ -236,10 +368,22 @@ export interface paths { path?: never; cookie?: never; }; - /** Get all transactions */ + /** + * Get all transactions + * @description Returns a list of all transactions. Users only see transactions where they are the member or the creator. + * - Members: can see transactions they are part of. + * - Creators: can see transactions they created. + * - Directors: can see transactions for members in their sport. + * - Admins: can see all transactions. + */ get: operations["getAllTransactions"]; put?: never; - /** Create transaction */ + /** + * Create transaction + * @description Creates a new financial transaction for a member. + * - Directors: can create transactions for members in their sport. + * - Admins: can create transactions for any member. + */ post: operations["createTransaction"]; delete?: never; options?: never; @@ -254,15 +398,32 @@ export interface paths { path?: never; cookie?: never; }; - /** Get transaction */ + /** + * Get transaction + * @description Returns the details of a specific transaction. + * - Members: can view transactions they are part of. + * - Creators: can view transactions they created. + * - Directors: can view transactions for members in their sport. + * - Admins: can view any transaction. + */ get: operations["getTransaction"]; put?: never; post?: never; - /** Delete transaction */ + /** + * Delete transaction + * @description Deletes a specific transaction. + * - Creators: can delete transactions they created. + * - Admins: can delete any transaction. + */ delete: operations["deleteTransaction"]; options?: never; head?: never; - /** Update transaction */ + /** + * Update transaction + * @description Partially updates a specific transaction. The member field can only be changed by admins. + * - Creators: can update transactions they created (except the member field). + * - Admins: can update any transaction including the member field. + */ patch: operations["updateTransaction"]; trace?: never; }; @@ -275,7 +436,13 @@ export interface paths { }; get?: never; put?: never; - /** Send mail */ + /** + * Send mail + * @description Sends an email based on the provided HTML template. + * - Trainers: can send mail to members of their team. + * - Directors: can send mail to members related to their sport. + * - Admins: can send mail to any member. + */ post: operations["sendMail"]; delete?: never; options?: never; @@ -292,7 +459,13 @@ export interface paths { }; get?: never; put?: never; - /** Get pdf */ + /** + * Get pdf + * @description Generates and returns a PDF document from the provided HTML template. + * - Trainers: can generate PDFs related to their team. + * - Directors: can generate PDFs related to their sport. + * - Admins: can generate PDFs related to any member. + */ post: operations["getPdf"]; delete?: never; options?: never; @@ -307,7 +480,13 @@ export interface paths { path?: never; cookie?: never; }; - /** Generate report */ + /** + * Generate report + * @description Generates an AI-based report for a member. Members can only generate reports for themselves. + * - All authenticated users: can generate a report for themselves. + * - Trainers: can generate reports for members of their team. + * - Admin: can generate a report for any member. + */ get: operations["generateReport"]; put?: never; post?: never; @@ -418,6 +597,8 @@ export interface components { first_name: string; last_name: string; email: string; + /** Format: password */ + password: string; /** Format: date */ birthday?: string; phone_number?: string;