Skip to content

Commit 2e8581b

Browse files
authored
Merge pull request #56 from FusionAuth/degroff/ENG-2805/fix_api_key_patch
ENG-2805: generated code for client libraries
2 parents 6c2972b + 910932d commit 2e8581b

1 file changed

Lines changed: 49 additions & 49 deletions

File tree

src/FusionAuth/FusionAuthClient.php

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
namespace FusionAuth;
33

44
/*
5-
* Copyright (c) 2018-2023, FusionAuth, All Rights Reserved
5+
* Copyright (c) 2018-2025, FusionAuth, All Rights Reserved
66
*
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
@@ -973,7 +973,7 @@ public function deactivateUserAction($userActionId)
973973
}
974974

975975
/**
976-
* Deactivates the users with the given ids.
976+
* Deactivates the users with the given Ids.
977977
*
978978
* @param array $userIds The ids of the users to deactivate.
979979
*
@@ -992,7 +992,7 @@ public function deactivateUsers($userIds)
992992
}
993993

994994
/**
995-
* Deactivates the users with the given ids.
995+
* Deactivates the users with the given Ids.
996996
*
997997
* @param array $userIds The ids of the users to deactivate.
998998
*
@@ -1566,8 +1566,8 @@ public function deleteUserWithRequest($userId, $request)
15661566
}
15671567

15681568
/**
1569-
* Deletes the users with the given ids, or users matching the provided JSON query or queryString.
1570-
* The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
1569+
* Deletes the users with the given Ids, or users matching the provided JSON query or queryString.
1570+
* The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request.
15711571
*
15721572
* This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
15731573
* Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
@@ -1587,8 +1587,8 @@ public function deleteUsers($request)
15871587
}
15881588

15891589
/**
1590-
* Deletes the users with the given ids, or users matching the provided JSON query or queryString.
1591-
* The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
1590+
* Deletes the users with the given Ids, or users matching the provided JSON query or queryString.
1591+
* The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request.
15921592
*
15931593
* This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
15941594
* Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
@@ -2237,7 +2237,7 @@ public function lookupIdentityProvider($domain)
22372237
* Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the
22382238
* action.
22392239
*
2240-
* @param string $actionId The Id of the action to modify. This is technically the user action log id.
2240+
* @param string $actionId The Id of the action to modify. This is technically the user action log Id.
22412241
* @param array $request The request that contains all the information about the modification.
22422242
*
22432243
* @return ClientResponse The ClientResponse.
@@ -2269,10 +2269,10 @@ public function passwordlessLogin($request)
22692269
}
22702270

22712271
/**
2272-
* Updates an authentication API key by given id
2272+
* Updates an API key with the given Id.
22732273
*
2274-
* @param string $keyId The Id of the authentication key. If not provided a secure random api key will be generated.
2275-
* @param array $request The request object that contains all the information needed to create the APIKey.
2274+
* @param string $keyId The Id of the API key. If not provided a secure random api key will be generated.
2275+
* @param array $request The request object that contains all the information needed to create the API key.
22762276
*
22772277
* @return ClientResponse The ClientResponse.
22782278
* @throws \Exception
@@ -2282,7 +2282,7 @@ public function patchAPIKey($keyId, $request)
22822282
return $this->start()->uri("/api/api-key")
22832283
->urlSegment($keyId)
22842284
->bodyHandler(new JSONBodyHandler($request))
2285-
->post()
2285+
->patch()
22862286
->go();
22872287
}
22882288

@@ -2935,7 +2935,7 @@ public function reindex($request)
29352935
}
29362936

29372937
/**
2938-
* Removes a user from the family with the given id.
2938+
* Removes a user from the family with the given Id.
29392939
*
29402940
* @param string $familyId The Id of the family to remove the user from.
29412941
* @param string $userId The Id of the user to remove from the family.
@@ -3006,7 +3006,7 @@ public function resendRegistrationVerification($email, $applicationId)
30063006
}
30073007

30083008
/**
3009-
* Retrieves an authentication API key for the given id
3009+
* Retrieves an authentication API key for the given Id.
30103010
*
30113011
* @param string $keyId The Id of the API key to retrieve.
30123012
*
@@ -3092,7 +3092,7 @@ public function retrieveActiveActions($userId)
30923092
/**
30933093
* Retrieves the application for the given Id or all the applications if the Id is null.
30943094
*
3095-
* @param string $applicationId (Optional) The application id.
3095+
* @param string $applicationId (Optional) The application Id.
30963096
*
30973097
* @return ClientResponse The ClientResponse.
30983098
* @throws \Exception
@@ -3196,10 +3196,10 @@ public function retrieveConsents()
31963196
}
31973197

31983198
/**
3199-
* Retrieves the daily active user report between the two instants. If you specify an application id, it will only
3199+
* Retrieves the daily active user report between the two instants. If you specify an application Id, it will only
32003200
* return the daily active counts for that application.
32013201
*
3202-
* @param string $applicationId (Optional) The application id.
3202+
* @param string $applicationId (Optional) The application Id.
32033203
* @param array $start The start instant as UTC milliseconds since Epoch.
32043204
* @param array $end The end instant as UTC milliseconds since Epoch.
32053205
*
@@ -3217,7 +3217,7 @@ public function retrieveDailyActiveReport($applicationId, $start, $end)
32173217
}
32183218

32193219
/**
3220-
* Retrieves the email template for the given Id. If you don't specify the id, this will return all the email templates.
3220+
* Retrieves the email template for the given Id. If you don't specify the Id, this will return all the email templates.
32213221
*
32223222
* @param string $emailTemplateId (Optional) The Id of the email template.
32233223
*
@@ -3732,10 +3732,10 @@ public function retrieveLambdasByType($type)
37323732
}
37333733

37343734
/**
3735-
* Retrieves the login report between the two instants. If you specify an application id, it will only return the
3735+
* Retrieves the login report between the two instants. If you specify an application Id, it will only return the
37363736
* login counts for that application.
37373737
*
3738-
* @param string $applicationId (Optional) The application id.
3738+
* @param string $applicationId (Optional) The application Id.
37393739
* @param array $start The start instant as UTC milliseconds since Epoch.
37403740
* @param array $end The end instant as UTC milliseconds since Epoch.
37413741
*
@@ -3753,7 +3753,7 @@ public function retrieveLoginReport($applicationId, $start, $end)
37533753
}
37543754

37553755
/**
3756-
* Retrieves the message template for the given Id. If you don't specify the id, this will return all the message templates.
3756+
* Retrieves the message template for the given Id. If you don't specify the Id, this will return all the message templates.
37573757
*
37583758
* @param string $messageTemplateId (Optional) The Id of the message template.
37593759
*
@@ -3829,10 +3829,10 @@ public function retrieveMessengers()
38293829
}
38303830

38313831
/**
3832-
* Retrieves the monthly active user report between the two instants. If you specify an application id, it will only
3832+
* Retrieves the monthly active user report between the two instants. If you specify an application Id, it will only
38333833
* return the monthly active counts for that application.
38343834
*
3835-
* @param string $applicationId (Optional) The application id.
3835+
* @param string $applicationId (Optional) The application Id.
38363836
* @param array $start The start instant as UTC milliseconds since Epoch.
38373837
* @param array $end The end instant as UTC milliseconds since Epoch.
38383838
*
@@ -4047,7 +4047,7 @@ public function retrieveRefreshTokens($userId)
40474047
}
40484048

40494049
/**
4050-
* Retrieves the user registration for the user with the given Id and the given application id.
4050+
* Retrieves the user registration for the user with the given Id and the given application Id.
40514051
*
40524052
* @param string $userId The Id of the user.
40534053
* @param string $applicationId The Id of the application.
@@ -4065,10 +4065,10 @@ public function retrieveRegistration($userId, $applicationId)
40654065
}
40664066

40674067
/**
4068-
* Retrieves the registration report between the two instants. If you specify an application id, it will only return
4068+
* Retrieves the registration report between the two instants. If you specify an application Id, it will only return
40694069
* the registration counts for that application.
40704070
*
4071-
* @param string $applicationId (Optional) The application id.
4071+
* @param string $applicationId (Optional) The application Id.
40724072
* @param array $start The start instant as UTC milliseconds since Epoch.
40734073
* @param array $end The end instant as UTC milliseconds since Epoch.
40744074
*
@@ -4287,7 +4287,7 @@ public function retrieveUser($userId)
42874287
}
42884288

42894289
/**
4290-
* Retrieves the user action for the given Id. If you pass in null for the id, this will return all the user
4290+
* Retrieves the user action for the given Id. If you pass in null for the Id, this will return all the user
42914291
* actions.
42924292
*
42934293
* @param string $userActionId (Optional) The Id of the user action.
@@ -4304,7 +4304,7 @@ public function retrieveUserAction($userActionId = NULL)
43044304
}
43054305

43064306
/**
4307-
* Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all the user
4307+
* Retrieves the user action reason for the given Id. If you pass in null for the Id, this will return all the user
43084308
* action reasons.
43094309
*
43104310
* @param string $userActionReasonId (Optional) The Id of the user action reason.
@@ -4435,8 +4435,8 @@ public function retrieveUserByVerificationId($verificationId)
44354435
*
44364436
* This API is useful if you want to build your own login workflow to complete a device grant.
44374437
*
4438-
* @param string $client_id The client id.
4439-
* @param string $client_secret The client id.
4438+
* @param string $client_id The client Id.
4439+
* @param string $client_secret The client Id.
44404440
* @param string $user_code The end-user verification code.
44414441
*
44424442
* @return ClientResponse The ClientResponse.
@@ -4581,11 +4581,11 @@ public function retrieveUserLinksByUserId($identityProviderId, $userId)
45814581
}
45824582

45834583
/**
4584-
* 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
4584+
* 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
45854585
* login counts for that application.
45864586
*
4587-
* @param string $applicationId (Optional) The application id.
4588-
* @param string $userId The userId id.
4587+
* @param string $applicationId (Optional) The application Id.
4588+
* @param string $userId The userId Id.
45894589
* @param array $start The start instant as UTC milliseconds since Epoch.
45904590
* @param array $end The end instant as UTC milliseconds since Epoch.
45914591
*
@@ -4604,11 +4604,11 @@ public function retrieveUserLoginReport($applicationId, $userId, $start, $end)
46044604
}
46054605

46064606
/**
4607-
* 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
4607+
* 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
46084608
* login counts for that application.
46094609
*
4610-
* @param string $applicationId (Optional) The application id.
4611-
* @param string $loginId The userId id.
4610+
* @param string $applicationId (Optional) The application Id.
4611+
* @param string $loginId The userId Id.
46124612
* @param array $start The start instant as UTC milliseconds since Epoch.
46134613
* @param array $end The end instant as UTC milliseconds since Epoch.
46144614
*
@@ -4709,7 +4709,7 @@ public function retrieveWebAuthnCredentialsForUser($userId)
47094709
}
47104710

47114711
/**
4712-
* Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
4712+
* Retrieves the webhook for the given Id. If you pass in null for the Id, this will return all the webhooks.
47134713
*
47144714
* @param string $webhookId (Optional) The Id of the webhook.
47154715
*
@@ -5009,7 +5009,7 @@ public function searchEntities($request)
50095009
}
50105010

50115011
/**
5012-
* Retrieves the entities for the given ids. If any Id is invalid, it is ignored.
5012+
* Retrieves the entities for the given Ids. If any Id is invalid, it is ignored.
50135013
*
50145014
* @param array $ids The entity ids to search for.
50155015
*
@@ -5233,7 +5233,7 @@ public function searchUserComments($request)
52335233
}
52345234

52355235
/**
5236-
* Retrieves the users for the given ids. If any Id is invalid, it is ignored.
5236+
* Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
52375237
*
52385238
* @param array $ids The user ids to search for.
52395239
*
@@ -5250,9 +5250,9 @@ public function searchUsers($ids)
52505250
}
52515251

52525252
/**
5253-
* Retrieves the users for the given ids. If any Id is invalid, it is ignored.
5253+
* Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
52545254
*
5255-
* @param array $ids The user ids to search for.
5255+
* @param array $ids The user Ids to search for.
52565256
*
52575257
* @return ClientResponse The ClientResponse.
52585258
* @throws \Exception
@@ -5333,7 +5333,7 @@ public function searchWebhooks($request)
53335333
}
53345334

53355335
/**
5336-
* Send an email using an email template id. You can optionally provide <code>requestData</code> to access key value
5336+
* Send an email using an email template Id. You can optionally provide <code>requestData</code> to access key value
53375337
* pairs in the email template.
53385338
*
53395339
* @param string $emailTemplateId The Id for the template.
@@ -5555,18 +5555,18 @@ public function twoFactorLogin($request)
55555555
}
55565556

55575557
/**
5558-
* Updates an API key by given id
5558+
* Updates an API key with the given Id.
55595559
*
5560-
* @param string $apiKeyId The Id of the API key to update.
5561-
* @param array $request The request object that contains all the information used to create the API Key.
5560+
* @param string $keyId The Id of the API key to update.
5561+
* @param array $request The request that contains all the new API key information.
55625562
*
55635563
* @return ClientResponse The ClientResponse.
55645564
* @throws \Exception
55655565
*/
5566-
public function updateAPIKey($apiKeyId, $request)
5566+
public function updateAPIKey($keyId, $request)
55675567
{
55685568
return $this->start()->uri("/api/api-key")
5569-
->urlSegment($apiKeyId)
5569+
->urlSegment($keyId)
55705570
->bodyHandler(new JSONBodyHandler($request))
55715571
->put()
55725572
->go();
@@ -6139,7 +6139,7 @@ public function upsertEntityGrant($entityId, $request)
61396139
* If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
61406140
*
61416141
* @param string $user_code The end-user verification code.
6142-
* @param string $client_id The client id.
6142+
* @param string $client_id The client Id.
61436143
*
61446144
* @return ClientResponse The ClientResponse.
61456145
* @throws \Exception
@@ -6308,4 +6308,4 @@ private function startAnonymous()
63086308
->successResponseHandler(new JSONResponseHandler())
63096309
->errorResponseHandler(new JSONResponseHandler());
63106310
}
6311-
}
6311+
}

0 commit comments

Comments
 (0)