Skip to content

Commit 0c879d2

Browse files
authored
Merge pull request #173 from FusionAuth/degroff/ENG-2805/fix_api_key_patch
ENG-2805: generated code for client libraries
2 parents 0376a6d + 85215ef commit 0c879d2

File tree

1 file changed

+48
-48
lines changed

1 file changed

+48
-48
lines changed

src/FusionAuthClient.ts

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2023, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2019-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.
@@ -861,7 +861,7 @@ export class FusionAuthClient {
861861
}
862862

863863
/**
864-
* Deactivates the users with the given ids.
864+
* Deactivates the users with the given Ids.
865865
*
866866
* @param {Array<string>} userIds The ids of the users to deactivate.
867867
* @returns {Promise<ClientResponse<UserDeleteResponse>>}
@@ -879,7 +879,7 @@ export class FusionAuthClient {
879879
}
880880

881881
/**
882-
* Deactivates the users with the given ids.
882+
* Deactivates the users with the given Ids.
883883
*
884884
* @param {Array<string>} userIds The ids of the users to deactivate.
885885
* @returns {Promise<ClientResponse<UserDeleteResponse>>}
@@ -1387,8 +1387,8 @@ export class FusionAuthClient {
13871387
}
13881388

13891389
/**
1390-
* Deletes the users with the given ids, or users matching the provided JSON query or queryString.
1391-
* The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
1390+
* Deletes the users with the given Ids, or users matching the provided JSON query or queryString.
1391+
* The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request.
13921392
*
13931393
* This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
13941394
* Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
@@ -1407,8 +1407,8 @@ export class FusionAuthClient {
14071407
}
14081408

14091409
/**
1410-
* Deletes the users with the given ids, or users matching the provided JSON query or queryString.
1411-
* The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
1410+
* Deletes the users with the given Ids, or users matching the provided JSON query or queryString.
1411+
* The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request.
14121412
*
14131413
* This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
14141414
* Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
@@ -1995,7 +1995,7 @@ export class FusionAuthClient {
19951995
* Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the
19961996
* action.
19971997
*
1998-
* @param {UUID} actionId The Id of the action to modify. This is technically the user action log id.
1998+
* @param {UUID} actionId The Id of the action to modify. This is technically the user action log Id.
19991999
* @param {ActionRequest} request The request that contains all the information about the modification.
20002000
* @returns {Promise<ClientResponse<ActionResponse>>}
20012001
*/
@@ -2023,18 +2023,18 @@ export class FusionAuthClient {
20232023
}
20242024

20252025
/**
2026-
* Updates an authentication API key by given id
2026+
* Updates an API key with the given Id.
20272027
*
2028-
* @param {UUID} keyId The Id of the authentication key. If not provided a secure random api key will be generated.
2029-
* @param {APIKeyRequest} request The request object that contains all the information needed to create the APIKey.
2028+
* @param {UUID} keyId The Id of the API key. If not provided a secure random api key will be generated.
2029+
* @param {APIKeyRequest} request The request object that contains all the information needed to create the API key.
20302030
* @returns {Promise<ClientResponse<APIKeyResponse>>}
20312031
*/
20322032
patchAPIKey(keyId: UUID, request: APIKeyRequest): Promise<ClientResponse<APIKeyResponse>> {
20332033
return this.start<APIKeyResponse, Errors>()
20342034
.withUri('/api/api-key')
20352035
.withUriSegment(keyId)
20362036
.withJSONBody(request)
2037-
.withMethod("POST")
2037+
.withMethod("PATCH")
20382038
.go();
20392039
}
20402040

@@ -2615,7 +2615,7 @@ export class FusionAuthClient {
26152615
}
26162616

26172617
/**
2618-
* Removes a user from the family with the given id.
2618+
* Removes a user from the family with the given Id.
26192619
*
26202620
* @param {UUID} familyId The Id of the family to remove the user from.
26212621
* @param {UUID} userId The Id of the user to remove from the family.
@@ -2678,7 +2678,7 @@ export class FusionAuthClient {
26782678
}
26792679

26802680
/**
2681-
* Retrieves an authentication API key for the given id
2681+
* Retrieves an authentication API key for the given Id.
26822682
*
26832683
* @param {UUID} keyId The Id of the API key to retrieve.
26842684
* @returns {Promise<ClientResponse<APIKeyResponse>>}
@@ -2754,7 +2754,7 @@ export class FusionAuthClient {
27542754
/**
27552755
* Retrieves the application for the given Id or all the applications if the Id is null.
27562756
*
2757-
* @param {UUID} applicationId (Optional) The application id.
2757+
* @param {UUID} applicationId (Optional) The application Id.
27582758
* @returns {Promise<ClientResponse<ApplicationResponse>>}
27592759
*/
27602760
retrieveApplication(applicationId: UUID): Promise<ClientResponse<ApplicationResponse>> {
@@ -2844,10 +2844,10 @@ export class FusionAuthClient {
28442844
}
28452845

28462846
/**
2847-
* Retrieves the daily active user report between the two instants. If you specify an application id, it will only
2847+
* Retrieves the daily active user report between the two instants. If you specify an application Id, it will only
28482848
* return the daily active counts for that application.
28492849
*
2850-
* @param {UUID} applicationId (Optional) The application id.
2850+
* @param {UUID} applicationId (Optional) The application Id.
28512851
* @param {number} start The start instant as UTC milliseconds since Epoch.
28522852
* @param {number} end The end instant as UTC milliseconds since Epoch.
28532853
* @returns {Promise<ClientResponse<DailyActiveUserReportResponse>>}
@@ -2863,7 +2863,7 @@ export class FusionAuthClient {
28632863
}
28642864

28652865
/**
2866-
* Retrieves the email template for the given Id. If you don't specify the id, this will return all the email templates.
2866+
* Retrieves the email template for the given Id. If you don't specify the Id, this will return all the email templates.
28672867
*
28682868
* @param {UUID} emailTemplateId (Optional) The Id of the email template.
28692869
* @returns {Promise<ClientResponse<EmailTemplateResponse>>}
@@ -3312,10 +3312,10 @@ export class FusionAuthClient {
33123312
}
33133313

33143314
/**
3315-
* Retrieves the login report between the two instants. If you specify an application id, it will only return the
3315+
* Retrieves the login report between the two instants. If you specify an application Id, it will only return the
33163316
* login counts for that application.
33173317
*
3318-
* @param {UUID} applicationId (Optional) The application id.
3318+
* @param {UUID} applicationId (Optional) The application Id.
33193319
* @param {number} start The start instant as UTC milliseconds since Epoch.
33203320
* @param {number} end The end instant as UTC milliseconds since Epoch.
33213321
* @returns {Promise<ClientResponse<LoginReportResponse>>}
@@ -3331,7 +3331,7 @@ export class FusionAuthClient {
33313331
}
33323332

33333333
/**
3334-
* Retrieves the message template for the given Id. If you don't specify the id, this will return all the message templates.
3334+
* Retrieves the message template for the given Id. If you don't specify the Id, this will return all the message templates.
33353335
*
33363336
* @param {UUID} messageTemplateId (Optional) The Id of the message template.
33373337
* @returns {Promise<ClientResponse<MessageTemplateResponse>>}
@@ -3397,10 +3397,10 @@ export class FusionAuthClient {
33973397
}
33983398

33993399
/**
3400-
* Retrieves the monthly active user report between the two instants. If you specify an application id, it will only
3400+
* Retrieves the monthly active user report between the two instants. If you specify an application Id, it will only
34013401
* return the monthly active counts for that application.
34023402
*
3403-
* @param {UUID} applicationId (Optional) The application id.
3403+
* @param {UUID} applicationId (Optional) The application Id.
34043404
* @param {number} start The start instant as UTC milliseconds since Epoch.
34053405
* @param {number} end The end instant as UTC milliseconds since Epoch.
34063406
* @returns {Promise<ClientResponse<MonthlyActiveUserReportResponse>>}
@@ -3589,7 +3589,7 @@ export class FusionAuthClient {
35893589
}
35903590

35913591
/**
3592-
* Retrieves the user registration for the user with the given Id and the given application id.
3592+
* Retrieves the user registration for the user with the given Id and the given application Id.
35933593
*
35943594
* @param {UUID} userId The Id of the user.
35953595
* @param {UUID} applicationId The Id of the application.
@@ -3605,10 +3605,10 @@ export class FusionAuthClient {
36053605
}
36063606

36073607
/**
3608-
* Retrieves the registration report between the two instants. If you specify an application id, it will only return
3608+
* Retrieves the registration report between the two instants. If you specify an application Id, it will only return
36093609
* the registration counts for that application.
36103610
*
3611-
* @param {UUID} applicationId (Optional) The application id.
3611+
* @param {UUID} applicationId (Optional) The application Id.
36123612
* @param {number} start The start instant as UTC milliseconds since Epoch.
36133613
* @param {number} end The end instant as UTC milliseconds since Epoch.
36143614
* @returns {Promise<ClientResponse<RegistrationReportResponse>>}
@@ -3799,7 +3799,7 @@ export class FusionAuthClient {
37993799
}
38003800

38013801
/**
3802-
* Retrieves the user action for the given Id. If you pass in null for the id, this will return all the user
3802+
* Retrieves the user action for the given Id. If you pass in null for the Id, this will return all the user
38033803
* actions.
38043804
*
38053805
* @param {UUID} userActionId (Optional) The Id of the user action.
@@ -3814,7 +3814,7 @@ export class FusionAuthClient {
38143814
}
38153815

38163816
/**
3817-
* Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all the user
3817+
* Retrieves the user action reason for the given Id. If you pass in null for the Id, this will return all the user
38183818
* action reasons.
38193819
*
38203820
* @param {UUID} userActionReasonId (Optional) The Id of the user action reason.
@@ -3929,8 +3929,8 @@ export class FusionAuthClient {
39293929
*
39303930
* This API is useful if you want to build your own login workflow to complete a device grant.
39313931
*
3932-
* @param {string} client_id The client id.
3933-
* @param {string} client_secret The client id.
3932+
* @param {string} client_id The client Id.
3933+
* @param {string} client_secret The client Id.
39343934
* @param {string} user_code The end-user verification code.
39353935
* @returns {Promise<ClientResponse<void>>}
39363936
*/
@@ -4059,11 +4059,11 @@ export class FusionAuthClient {
40594059
}
40604060

40614061
/**
4062-
* 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
4062+
* 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
40634063
* login counts for that application.
40644064
*
4065-
* @param {UUID} applicationId (Optional) The application id.
4066-
* @param {UUID} userId The userId id.
4065+
* @param {UUID} applicationId (Optional) The application Id.
4066+
* @param {UUID} userId The userId Id.
40674067
* @param {number} start The start instant as UTC milliseconds since Epoch.
40684068
* @param {number} end The end instant as UTC milliseconds since Epoch.
40694069
* @returns {Promise<ClientResponse<LoginReportResponse>>}
@@ -4080,11 +4080,11 @@ export class FusionAuthClient {
40804080
}
40814081

40824082
/**
4083-
* 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
4083+
* 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
40844084
* login counts for that application.
40854085
*
4086-
* @param {UUID} applicationId (Optional) The application id.
4087-
* @param {string} loginId The userId id.
4086+
* @param {UUID} applicationId (Optional) The application Id.
4087+
* @param {string} loginId The userId Id.
40884088
* @param {number} start The start instant as UTC milliseconds since Epoch.
40894089
* @param {number} end The end instant as UTC milliseconds since Epoch.
40904090
* @returns {Promise<ClientResponse<LoginReportResponse>>}
@@ -4173,7 +4173,7 @@ export class FusionAuthClient {
41734173
}
41744174

41754175
/**
4176-
* Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
4176+
* Retrieves the webhook for the given Id. If you pass in null for the Id, this will return all the webhooks.
41774177
*
41784178
* @param {UUID} webhookId (Optional) The Id of the webhook.
41794179
* @returns {Promise<ClientResponse<WebhookResponse>>}
@@ -4439,7 +4439,7 @@ export class FusionAuthClient {
44394439
}
44404440

44414441
/**
4442-
* Retrieves the entities for the given ids. If any Id is invalid, it is ignored.
4442+
* Retrieves the entities for the given Ids. If any Id is invalid, it is ignored.
44434443
*
44444444
* @param {Array<string>} ids The entity ids to search for.
44454445
* @returns {Promise<ClientResponse<EntitySearchResponse>>}
@@ -4635,7 +4635,7 @@ export class FusionAuthClient {
46354635
}
46364636

46374637
/**
4638-
* Retrieves the users for the given ids. If any Id is invalid, it is ignored.
4638+
* Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
46394639
*
46404640
* @param {Array<string>} ids The user ids to search for.
46414641
* @returns {Promise<ClientResponse<SearchResponse>>}
@@ -4651,9 +4651,9 @@ export class FusionAuthClient {
46514651
}
46524652

46534653
/**
4654-
* Retrieves the users for the given ids. If any Id is invalid, it is ignored.
4654+
* Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
46554655
*
4656-
* @param {Array<string>} ids The user ids to search for.
4656+
* @param {Array<string>} ids The user Ids to search for.
46574657
* @returns {Promise<ClientResponse<SearchResponse>>}
46584658
*/
46594659
searchUsersByIds(ids: Array<string>): Promise<ClientResponse<SearchResponse>> {
@@ -4725,7 +4725,7 @@ export class FusionAuthClient {
47254725
}
47264726

47274727
/**
4728-
* Send an email using an email template id. You can optionally provide <code>requestData</code> to access key value
4728+
* Send an email using an email template Id. You can optionally provide <code>requestData</code> to access key value
47294729
* pairs in the email template.
47304730
*
47314731
* @param {UUID} emailTemplateId The Id for the template.
@@ -4924,16 +4924,16 @@ export class FusionAuthClient {
49244924
}
49254925

49264926
/**
4927-
* Updates an API key by given id
4927+
* Updates an API key with the given Id.
49284928
*
4929-
* @param {UUID} apiKeyId The Id of the API key to update.
4930-
* @param {APIKeyRequest} request The request object that contains all the information used to create the API Key.
4929+
* @param {UUID} keyId The Id of the API key to update.
4930+
* @param {APIKeyRequest} request The request that contains all the new API key information.
49314931
* @returns {Promise<ClientResponse<APIKeyResponse>>}
49324932
*/
4933-
updateAPIKey(apiKeyId: UUID, request: APIKeyRequest): Promise<ClientResponse<APIKeyResponse>> {
4933+
updateAPIKey(keyId: UUID, request: APIKeyRequest): Promise<ClientResponse<APIKeyResponse>> {
49344934
return this.start<APIKeyResponse, Errors>()
49354935
.withUri('/api/api-key')
4936-
.withUriSegment(apiKeyId)
4936+
.withUriSegment(keyId)
49374937
.withJSONBody(request)
49384938
.withMethod("PUT")
49394939
.go();
@@ -5444,7 +5444,7 @@ export class FusionAuthClient {
54445444
* If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
54455445
*
54465446
* @param {string} user_code The end-user verification code.
5447-
* @param {string} client_id The client id.
5447+
* @param {string} client_id The client Id.
54485448
* @returns {Promise<ClientResponse<void>>}
54495449
*/
54505450
validateDevice(user_code: string, client_id: string): Promise<ClientResponse<void>> {

0 commit comments

Comments
 (0)