Class UserAPI

java.lang.Object
com.glowmart.shop_management.api.UserAPI

public final class UserAPI extends Object
A utility class that contains constants for API endpoint paths related to user operations.

This class holds static final strings that define the paths for user-related API endpoints, such as signing up a user, logging in a user, and others. These constants are used across the application to avoid hardcoding the paths and ensure consistency in the API structure.

  • Field Details

    • BASE_PATH

      public static final String BASE_PATH
      The base path for all user-related API endpoints.

      This is the root URL for the user API endpoints. All user-related paths will be prefixed with this value, such as "/api/user/{role}/sign-up" or "/api/user/login".

      See Also:
    • USER_SIGN_UP

      public static final String USER_SIGN_UP
      The path for the user sign-up endpoint.

      This endpoint allows users to sign up. The path includes a placeholder for the role of the user, which will be dynamically replaced when making the request (e.g., "/api/user/admin/sign-up").

      See Also:
    • USER_LOGIN

      public static final String USER_LOGIN
      The path for the user login endpoint.

      This endpoint allows users to log in. The path is static, as it does not require any dynamic placeholders.

      See Also:
    • REFRESH_TOKEN

      public static final String REFRESH_TOKEN
      The path for the refresh token endpoint.

      This endpoint is used to obtain a new access token by presenting a valid refresh token. It helps maintain user sessions without requiring re‑authentication.

      See Also:
    • USER_LOGOUT

      public static final String USER_LOGOUT
      The path for the user logout endpoint.

      This endpoint invalidates the user's refresh token and ends the session. After logout, the user cannot use the old refresh token to obtain new access tokens.

      See Also:
    • USER_LIST

      public static final String USER_LIST
      The path for the user list retrieval endpoint.

      This endpoint returns a paginated list of users. The path is static and does not include any dynamic parameters or placeholders.

      See Also:
    • USER_UPDATE

      public static final String USER_UPDATE
      The path for the user update endpoint.

      This endpoint is used to update user details. It includes a dynamic path parameter {id}, which should be replaced with the unique identifier of the user to be updated.

      See Also:
  • Constructor Details

    • UserAPI

      public UserAPI()