Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 49 additions & 49 deletions src/main/java/io/fusionauth/client/FusionAuthClient.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2023, FusionAuth, All Rights Reserved
* Copyright (c) 2018-2025, FusionAuth, All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -1133,7 +1133,7 @@ public ClientResponse<Void, Errors> deactivateUserAction(UUID userActionId) {
}

/**
* Deactivates the users with the given ids.
* Deactivates the users with the given Ids.
*
* @param userIds The ids of the users to deactivate.
* @return The ClientResponse object.
Expand All @@ -1151,7 +1151,7 @@ public ClientResponse<UserDeleteResponse, Errors> deactivateUsers(Collection<UUI
}

/**
* Deactivates the users with the given ids.
* Deactivates the users with the given Ids.
*
* @param userIds The ids of the users to deactivate.
* @return The ClientResponse object.
Expand Down Expand Up @@ -1659,8 +1659,8 @@ public ClientResponse<Void, Errors> deleteUserWithRequest(UUID userId, UserDelet
}

/**
* Deletes the users with the given ids, or users matching the provided JSON query or queryString.
* The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
* Deletes the users with the given Ids, or users matching the provided JSON query or queryString.
* The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request.
* <p>
* This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
* Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
Expand All @@ -1679,8 +1679,8 @@ public ClientResponse<UserDeleteResponse, Errors> deleteUsers(UserDeleteRequest
}

/**
* Deletes the users with the given ids, or users matching the provided JSON query or queryString.
* The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
* Deletes the users with the given Ids, or users matching the provided JSON query or queryString.
* The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request.
* <p>
* This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
* Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
Expand Down Expand Up @@ -2259,7 +2259,7 @@ public ClientResponse<LookupResponse, Void> lookupIdentityProvider(String domain
* Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the
* action.
*
* @param actionId The Id of the action to modify. This is technically the user action log id.
* @param actionId The Id of the action to modify. This is technically the user action log Id.
* @param request The request that contains all the information about the modification.
* @return The ClientResponse object.
*/
Expand Down Expand Up @@ -2287,18 +2287,18 @@ public ClientResponse<LoginResponse, Errors> passwordlessLogin(PasswordlessLogin
}

/**
* Updates an authentication API key by given id
* Updates an API key with the given Id.
*
* @param keyId The Id of the authentication key. If not provided a secure random api key will be generated.
* @param request The request object that contains all the information needed to create the APIKey.
* @param keyId The Id of the API key. If not provided a secure random api key will be generated.
* @param request The request object that contains all the information needed to create the API key.
* @return The ClientResponse object.
*/
public ClientResponse<APIKeyResponse, Errors> patchAPIKey(UUID keyId, APIKeyRequest request) {
public ClientResponse<APIKeyResponse, Errors> patchAPIKey(UUID keyId, Map<String, Object> request) {
return start(APIKeyResponse.class, Errors.class)
.uri("/api/api-key")
.urlSegment(keyId)
.bodyHandler(new JSONBodyHandler(request, objectMapper()))
.post()
.patch()
.go();
}

Expand Down Expand Up @@ -2879,7 +2879,7 @@ public ClientResponse<Void, Errors> reindex(ReindexRequest request) {
}

/**
* Removes a user from the family with the given id.
* Removes a user from the family with the given Id.
*
* @param familyId The Id of the family to remove the user from.
* @param userId The Id of the user to remove from the family.
Expand Down Expand Up @@ -2942,7 +2942,7 @@ public ClientResponse<VerifyRegistrationResponse, Errors> resendRegistrationVeri
}

/**
* Retrieves an authentication API key for the given id
* Retrieves an authentication API key for the given Id.
*
* @param keyId The Id of the API key to retrieve.
* @return The ClientResponse object.
Expand Down Expand Up @@ -3018,7 +3018,7 @@ public ClientResponse<ActionResponse, Errors> retrieveActiveActions(UUID userId)
/**
* Retrieves the application for the given Id or all the applications if the Id is null.
*
* @param applicationId (Optional) The application id.
* @param applicationId (Optional) The application Id.
* @return The ClientResponse object.
*/
public ClientResponse<ApplicationResponse, Void> retrieveApplication(UUID applicationId) {
Expand Down Expand Up @@ -3108,10 +3108,10 @@ public ClientResponse<ConsentResponse, Void> retrieveConsents() {
}

/**
* Retrieves the daily active user report between the two instants. If you specify an application id, it will only
* Retrieves the daily active user report between the two instants. If you specify an application Id, it will only
* return the daily active counts for that application.
*
* @param applicationId (Optional) The application id.
* @param applicationId (Optional) The application Id.
* @param start The start instant as UTC milliseconds since Epoch.
* @param end The end instant as UTC milliseconds since Epoch.
* @return The ClientResponse object.
Expand All @@ -3127,7 +3127,7 @@ public ClientResponse<DailyActiveUserReportResponse, Errors> retrieveDailyActive
}

/**
* Retrieves the email template for the given Id. If you don't specify the id, this will return all the email templates.
* Retrieves the email template for the given Id. If you don't specify the Id, this will return all the email templates.
*
* @param emailTemplateId (Optional) The Id of the email template.
* @return The ClientResponse object.
Expand Down Expand Up @@ -3576,10 +3576,10 @@ public ClientResponse<LambdaResponse, Void> retrieveLambdasByType(LambdaType typ
}

/**
* Retrieves the login report between the two instants. If you specify an application id, it will only return the
* Retrieves the login report between the two instants. If you specify an application Id, it will only return the
* login counts for that application.
*
* @param applicationId (Optional) The application id.
* @param applicationId (Optional) The application Id.
* @param start The start instant as UTC milliseconds since Epoch.
* @param end The end instant as UTC milliseconds since Epoch.
* @return The ClientResponse object.
Expand All @@ -3595,7 +3595,7 @@ public ClientResponse<LoginReportResponse, Errors> retrieveLoginReport(UUID appl
}

/**
* Retrieves the message template for the given Id. If you don't specify the id, this will return all the message templates.
* Retrieves the message template for the given Id. If you don't specify the Id, this will return all the message templates.
*
* @param messageTemplateId (Optional) The Id of the message template.
* @return The ClientResponse object.
Expand Down Expand Up @@ -3661,10 +3661,10 @@ public ClientResponse<MessengerResponse, Void> retrieveMessengers() {
}

/**
* Retrieves the monthly active user report between the two instants. If you specify an application id, it will only
* Retrieves the monthly active user report between the two instants. If you specify an application Id, it will only
* return the monthly active counts for that application.
*
* @param applicationId (Optional) The application id.
* @param applicationId (Optional) The application Id.
* @param start The start instant as UTC milliseconds since Epoch.
* @param end The end instant as UTC milliseconds since Epoch.
* @return The ClientResponse object.
Expand Down Expand Up @@ -3853,7 +3853,7 @@ public ClientResponse<RefreshTokenResponse, Errors> retrieveRefreshTokens(UUID u
}

/**
* Retrieves the user registration for the user with the given Id and the given application id.
* Retrieves the user registration for the user with the given Id and the given application Id.
*
* @param userId The Id of the user.
* @param applicationId The Id of the application.
Expand All @@ -3869,10 +3869,10 @@ public ClientResponse<RegistrationResponse, Errors> retrieveRegistration(UUID us
}

/**
* Retrieves the registration report between the two instants. If you specify an application id, it will only return
* Retrieves the registration report between the two instants. If you specify an application Id, it will only return
* the registration counts for that application.
*
* @param applicationId (Optional) The application id.
* @param applicationId (Optional) The application Id.
* @param start The start instant as UTC milliseconds since Epoch.
* @param end The end instant as UTC milliseconds since Epoch.
* @return The ClientResponse object.
Expand Down Expand Up @@ -4063,7 +4063,7 @@ public ClientResponse<UserResponse, Errors> retrieveUser(UUID userId) {
}

/**
* Retrieves the user action for the given Id. If you pass in null for the id, this will return all the user
* Retrieves the user action for the given Id. If you pass in null for the Id, this will return all the user
* actions.
*
* @param userActionId (Optional) The Id of the user action.
Expand All @@ -4078,7 +4078,7 @@ public ClientResponse<UserActionResponse, Void> retrieveUserAction(UUID userActi
}

/**
* Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all the user
* Retrieves the user action reason for the given Id. If you pass in null for the Id, this will return all the user
* action reasons.
*
* @param userActionReasonId (Optional) The Id of the user action reason.
Expand Down Expand Up @@ -4193,8 +4193,8 @@ public ClientResponse<UserResponse, Errors> retrieveUserByVerificationId(String
* <p>
* This API is useful if you want to build your own login workflow to complete a device grant.
*
* @param client_id The client id.
* @param client_secret The client id.
* @param client_id The client Id.
* @param client_secret The client Id.
* @param user_code The end-user verification code.
* @return The ClientResponse object.
*/
Expand Down Expand Up @@ -4321,11 +4321,11 @@ public ClientResponse<IdentityProviderLinkResponse, Errors> retrieveUserLinksByU
}

/**
* Retrieves the login report between the two instants for a particular user by Id. If you specify an application id, it will only return the
* Retrieves the login report between the two instants for a particular user by Id. If you specify an application Id, it will only return the
* login counts for that application.
*
* @param applicationId (Optional) The application id.
* @param userId The userId id.
* @param applicationId (Optional) The application Id.
* @param userId The userId Id.
* @param start The start instant as UTC milliseconds since Epoch.
* @param end The end instant as UTC milliseconds since Epoch.
* @return The ClientResponse object.
Expand All @@ -4342,11 +4342,11 @@ public ClientResponse<LoginReportResponse, Errors> retrieveUserLoginReport(UUID
}

/**
* Retrieves the login report between the two instants for a particular user by login Id. If you specify an application id, it will only return the
* Retrieves the login report between the two instants for a particular user by login Id. If you specify an application Id, it will only return the
* login counts for that application.
*
* @param applicationId (Optional) The application id.
* @param loginId The userId id.
* @param applicationId (Optional) The application Id.
* @param loginId The userId Id.
* @param start The start instant as UTC milliseconds since Epoch.
* @param end The end instant as UTC milliseconds since Epoch.
* @return The ClientResponse object.
Expand Down Expand Up @@ -4435,7 +4435,7 @@ public ClientResponse<WebAuthnCredentialResponse, Errors> retrieveWebAuthnCreden
}

/**
* Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
* Retrieves the webhook for the given Id. If you pass in null for the Id, this will return all the webhooks.
*
* @param webhookId (Optional) The Id of the webhook.
* @return The ClientResponse object.
Expand Down Expand Up @@ -4701,7 +4701,7 @@ public ClientResponse<EntitySearchResponse, Errors> searchEntities(EntitySearchR
}

/**
* Retrieves the entities for the given ids. If any Id is invalid, it is ignored.
* Retrieves the entities for the given Ids. If any Id is invalid, it is ignored.
*
* @param ids The entity ids to search for.
* @return The ClientResponse object.
Expand Down Expand Up @@ -4897,7 +4897,7 @@ public ClientResponse<UserCommentSearchResponse, Errors> searchUserComments(User
}

/**
* Retrieves the users for the given ids. If any Id is invalid, it is ignored.
* Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
*
* @param ids The user ids to search for.
* @return The ClientResponse object.
Expand All @@ -4913,9 +4913,9 @@ public ClientResponse<SearchResponse, Errors> searchUsers(Collection<UUID> ids)
}

/**
* Retrieves the users for the given ids. If any Id is invalid, it is ignored.
* Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
*
* @param ids The user ids to search for.
* @param ids The user Ids to search for.
* @return The ClientResponse object.
*/
public ClientResponse<SearchResponse, Errors> searchUsersByIds(Collection<UUID> ids) {
Expand Down Expand Up @@ -4987,7 +4987,7 @@ public ClientResponse<WebhookSearchResponse, Errors> searchWebhooks(WebhookSearc
}

/**
* Send an email using an email template id. You can optionally provide <code>requestData</code> to access key value
* Send an email using an email template Id. You can optionally provide <code>requestData</code> to access key value
* pairs in the email template.
*
* @param emailTemplateId The Id for the template.
Expand Down Expand Up @@ -5185,16 +5185,16 @@ public ClientResponse<LoginResponse, Errors> twoFactorLogin(TwoFactorLoginReques
}

/**
* Updates an API key by given id
* Updates an API key with the given Id.
*
* @param apiKeyId The Id of the API key to update.
* @param request The request object that contains all the information used to create the API Key.
* @param keyId The Id of the API key to update.
* @param request The request that contains all the new API key information.
* @return The ClientResponse object.
*/
public ClientResponse<APIKeyResponse, Errors> updateAPIKey(UUID apiKeyId, APIKeyRequest request) {
public ClientResponse<APIKeyResponse, Errors> updateAPIKey(UUID keyId, APIKeyRequest request) {
return start(APIKeyResponse.class, Errors.class)
.uri("/api/api-key")
.urlSegment(apiKeyId)
.urlSegment(keyId)
.bodyHandler(new JSONBodyHandler(request, objectMapper()))
.put()
.go();
Expand Down Expand Up @@ -5705,7 +5705,7 @@ public ClientResponse<Void, Errors> upsertEntityGrant(UUID entityId, EntityGrant
* If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
*
* @param user_code The end-user verification code.
* @param client_id The client id.
* @param client_id The client Id.
* @return The ClientResponse object.
*/
public ClientResponse<Void, Void> validateDevice(String user_code, String client_id) {
Expand Down