@@ -45,15 +45,6 @@ async def create_user_pre_registration(
4545) -> int :
4646 """Creates a user pre-registration entry.
4747
48- Args:
49- engine: Database engine
50- connection: Optional existing connection
51- email: Email address for the pre-registration
52- created_by: ID of the user creating the pre-registration (None for anonymous)
53- product_name: Product name the user is requesting access to
54- link_to_existing_user: Whether to link the pre-registration to an existing user with the same email
55- **other_values: Additional values to insert in the pre-registration entry
56-
5748 Returns:
5849 ID of the created pre-registration
5950 """
@@ -104,15 +95,6 @@ async def list_user_pre_registrations(
10495) -> tuple [list [dict [str , Any ]], int ]:
10596 """Lists user pre-registrations with optional filters.
10697
107- Args:
108- engine: Database engine
109- connection: Optional existing connection
110- filter_by_pre_email: Filter by email pattern (SQL LIKE pattern)
111- filter_by_product_name: Filter by product name
112- filter_by_account_request_status: Filter by account request status
113- pagination_limit: Maximum number of results to return
114- pagination_offset: Number of results to skip (for pagination)
115-
11698 Returns:
11799 Tuple of (list of pre-registration records, total count)
118100 """
@@ -216,16 +198,7 @@ async def review_user_pre_registration(
216198 new_status : AccountRequestStatus ,
217199 invitation_extras : dict [str , Any ] | None = None ,
218200) -> None :
219- """Updates the account request status of a pre-registered user.
220-
221- Args:
222- engine: The database engine
223- connection: Optional existing connection
224- pre_registration_id: ID of the pre-registration record
225- reviewed_by: ID of the user who reviewed the request
226- new_status: New status (APPROVED or REJECTED)
227- invitation_extras: Optional invitation data to store in extras field
228- """
201+ """Updates the account request status of a pre-registered user."""
229202 if new_status not in (AccountRequestStatus .APPROVED , AccountRequestStatus .REJECTED ):
230203 msg = f"Invalid status for review: { new_status } . Must be APPROVED or REJECTED."
231204 raise ValueError (msg )
@@ -482,30 +455,22 @@ async def list_merged_pre_and_registered_users(
482455 product_name : ProductName ,
483456 filter_any_account_request_status : Annotated [
484457 list [AccountRequestStatus ] | None ,
485- doc (
486- "If provided, only returns users with account request status in this list (only pre-registered users with any of these statuses will be included)"
487- ),
458+ doc ("Only returns users with these statuses (pre-registered users only)" ),
488459 ] = None ,
489460 filter_include_deleted : bool = False ,
490461 pagination_limit : int = 50 ,
491462 pagination_offset : int = 0 ,
492463 order_by : Annotated [
493464 list [tuple [OrderKeys , OrderDirection ]] | None ,
494- doc (
495- 'Valid fields: "email", "current_status_created". '
496- 'Default: [("email", OrderDirection.ASC), ("is_pre_registered", OrderDirection.DESC), ("current_status_created", OrderDirection.DESC)]'
497- ),
465+ doc ('Valid fields: "email", "current_status_created"' ),
498466 ] = None ,
499467) -> tuple [list [MergedUserData ], int ]:
500468 """Retrieves and merges users from both users and pre-registration tables.
501469
502- This returns:
503- 1. Users who are registered with the platform (in users table)
504- 2. Users who are pre-registered (in users_pre_registration_details table)
505- 3. Users who are both registered and pre-registered
506-
507470 Returns:
508- Tuple of (list of merged user data, total count)
471+ 1. Users registered with the platform (users table)
472+ 2. Users pre-registered (users_pre_registration_details table)
473+ 3. Users both registered and pre-registered
509474 """
510475 # Base where conditions for both queries
511476 pre_reg_query_conditions = [
0 commit comments