Skip to content

Commit 0b9c8fe

Browse files
authored
Merge pull request #122 from FusionAuth/degroff/ENG-2805/fix_api_key_patch
ENG-2805: generated code for client libraries
2 parents 37df48e + ae5a200 commit 0b9c8fe

1 file changed

Lines changed: 49 additions & 49 deletions

File tree

src/main/java/io/fusionauth/client/FusionAuthClient.java

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018-2023, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2018-2025, FusionAuth, All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -1133,7 +1133,7 @@ public ClientResponse<Void, Errors> deactivateUserAction(UUID userActionId) {
11331133
}
11341134

11351135
/**
1136-
* Deactivates the users with the given ids.
1136+
* Deactivates the users with the given Ids.
11371137
*
11381138
* @param userIds The ids of the users to deactivate.
11391139
* @return The ClientResponse object.
@@ -1151,7 +1151,7 @@ public ClientResponse<UserDeleteResponse, Errors> deactivateUsers(Collection<UUI
11511151
}
11521152

11531153
/**
1154-
* Deactivates the users with the given ids.
1154+
* Deactivates the users with the given Ids.
11551155
*
11561156
* @param userIds The ids of the users to deactivate.
11571157
* @return The ClientResponse object.
@@ -1659,8 +1659,8 @@ public ClientResponse<Void, Errors> deleteUserWithRequest(UUID userId, UserDelet
16591659
}
16601660

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

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

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

@@ -2879,7 +2879,7 @@ public ClientResponse<Void, Errors> reindex(ReindexRequest request) {
28792879
}
28802880

28812881
/**
2882-
* Removes a user from the family with the given id.
2882+
* Removes a user from the family with the given Id.
28832883
*
28842884
* @param familyId The Id of the family to remove the user from.
28852885
* @param userId The Id of the user to remove from the family.
@@ -2942,7 +2942,7 @@ public ClientResponse<VerifyRegistrationResponse, Errors> resendRegistrationVeri
29422942
}
29432943

29442944
/**
2945-
* Retrieves an authentication API key for the given id
2945+
* Retrieves an authentication API key for the given Id.
29462946
*
29472947
* @param keyId The Id of the API key to retrieve.
29482948
* @return The ClientResponse object.
@@ -3018,7 +3018,7 @@ public ClientResponse<ActionResponse, Errors> retrieveActiveActions(UUID userId)
30183018
/**
30193019
* Retrieves the application for the given Id or all the applications if the Id is null.
30203020
*
3021-
* @param applicationId (Optional) The application id.
3021+
* @param applicationId (Optional) The application Id.
30223022
* @return The ClientResponse object.
30233023
*/
30243024
public ClientResponse<ApplicationResponse, Void> retrieveApplication(UUID applicationId) {
@@ -3108,10 +3108,10 @@ public ClientResponse<ConsentResponse, Void> retrieveConsents() {
31083108
}
31093109

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

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

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

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

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

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

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

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

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

43234323
/**
4324-
* 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
4324+
* 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
43254325
* login counts for that application.
43264326
*
4327-
* @param applicationId (Optional) The application id.
4328-
* @param userId The userId id.
4327+
* @param applicationId (Optional) The application Id.
4328+
* @param userId The userId Id.
43294329
* @param start The start instant as UTC milliseconds since Epoch.
43304330
* @param end The end instant as UTC milliseconds since Epoch.
43314331
* @return The ClientResponse object.
@@ -4342,11 +4342,11 @@ public ClientResponse<LoginReportResponse, Errors> retrieveUserLoginReport(UUID
43424342
}
43434343

43444344
/**
4345-
* 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
4345+
* 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
43464346
* login counts for that application.
43474347
*
4348-
* @param applicationId (Optional) The application id.
4349-
* @param loginId The userId id.
4348+
* @param applicationId (Optional) The application Id.
4349+
* @param loginId The userId Id.
43504350
* @param start The start instant as UTC milliseconds since Epoch.
43514351
* @param end The end instant as UTC milliseconds since Epoch.
43524352
* @return The ClientResponse object.
@@ -4435,7 +4435,7 @@ public ClientResponse<WebAuthnCredentialResponse, Errors> retrieveWebAuthnCreden
44354435
}
44364436

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

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

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

49154915
/**
4916-
* Retrieves the users for the given ids. If any Id is invalid, it is ignored.
4916+
* Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
49174917
*
4918-
* @param ids The user ids to search for.
4918+
* @param ids The user Ids to search for.
49194919
* @return The ClientResponse object.
49204920
*/
49214921
public ClientResponse<SearchResponse, Errors> searchUsersByIds(Collection<UUID> ids) {
@@ -4987,7 +4987,7 @@ public ClientResponse<WebhookSearchResponse, Errors> searchWebhooks(WebhookSearc
49874987
}
49884988

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

51875187
/**
5188-
* Updates an API key by given id
5188+
* Updates an API key with the given Id.
51895189
*
5190-
* @param apiKeyId The Id of the API key to update.
5191-
* @param request The request object that contains all the information used to create the API Key.
5190+
* @param keyId The Id of the API key to update.
5191+
* @param request The request that contains all the new API key information.
51925192
* @return The ClientResponse object.
51935193
*/
5194-
public ClientResponse<APIKeyResponse, Errors> updateAPIKey(UUID apiKeyId, APIKeyRequest request) {
5194+
public ClientResponse<APIKeyResponse, Errors> updateAPIKey(UUID keyId, APIKeyRequest request) {
51955195
return start(APIKeyResponse.class, Errors.class)
51965196
.uri("/api/api-key")
5197-
.urlSegment(apiKeyId)
5197+
.urlSegment(keyId)
51985198
.bodyHandler(new JSONBodyHandler(request, objectMapper()))
51995199
.put()
52005200
.go();
@@ -5705,7 +5705,7 @@ public ClientResponse<Void, Errors> upsertEntityGrant(UUID entityId, EntityGrant
57055705
* If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
57065706
*
57075707
* @param user_code The end-user verification code.
5708-
* @param client_id The client id.
5708+
* @param client_id The client Id.
57095709
* @return The ClientResponse object.
57105710
*/
57115711
public ClientResponse<Void, Void> validateDevice(String user_code, String client_id) {

0 commit comments

Comments
 (0)