Skip to content

ENG-2805: generated code for client libraries #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
96 changes: 48 additions & 48 deletions src/FusionAuthClient.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, FusionAuth, All Rights Reserved
* Copyright (c) 2019-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 @@ -861,7 +861,7 @@ export class FusionAuthClient {
}

/**
* Deactivates the users with the given ids.
* Deactivates the users with the given Ids.
*
* @param {Array<string>} userIds The ids of the users to deactivate.
* @returns {Promise<ClientResponse<UserDeleteResponse>>}
Expand All @@ -879,7 +879,7 @@ export class FusionAuthClient {
}

/**
* Deactivates the users with the given ids.
* Deactivates the users with the given Ids.
*
* @param {Array<string>} userIds The ids of the users to deactivate.
* @returns {Promise<ClientResponse<UserDeleteResponse>>}
Expand Down Expand Up @@ -1387,8 +1387,8 @@ export class FusionAuthClient {
}

/**
* 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.
*
* 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 @@ -1407,8 +1407,8 @@ export class FusionAuthClient {
}

/**
* 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.
*
* 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 @@ -1995,7 +1995,7 @@ export class FusionAuthClient {
* Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the
* action.
*
* @param {UUID} actionId The Id of the action to modify. This is technically the user action log id.
* @param {UUID} actionId The Id of the action to modify. This is technically the user action log Id.
* @param {ActionRequest} request The request that contains all the information about the modification.
* @returns {Promise<ClientResponse<ActionResponse>>}
*/
Expand Down Expand Up @@ -2023,18 +2023,18 @@ export class FusionAuthClient {
}

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

Expand Down Expand Up @@ -2615,7 +2615,7 @@ export class FusionAuthClient {
}

/**
* Removes a user from the family with the given id.
* Removes a user from the family with the given Id.
*
* @param {UUID} familyId The Id of the family to remove the user from.
* @param {UUID} userId The Id of the user to remove from the family.
Expand Down Expand Up @@ -2678,7 +2678,7 @@ export class FusionAuthClient {
}

/**
* Retrieves an authentication API key for the given id
* Retrieves an authentication API key for the given Id.
*
* @param {UUID} keyId The Id of the API key to retrieve.
* @returns {Promise<ClientResponse<APIKeyResponse>>}
Expand Down Expand Up @@ -2754,7 +2754,7 @@ export class FusionAuthClient {
/**
* Retrieves the application for the given Id or all the applications if the Id is null.
*
* @param {UUID} applicationId (Optional) The application id.
* @param {UUID} applicationId (Optional) The application Id.
* @returns {Promise<ClientResponse<ApplicationResponse>>}
*/
retrieveApplication(applicationId: UUID): Promise<ClientResponse<ApplicationResponse>> {
Expand Down Expand Up @@ -2844,10 +2844,10 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} applicationId (Optional) The application id.
* @param {UUID} applicationId (Optional) The application Id.
* @param {number} start The start instant as UTC milliseconds since Epoch.
* @param {number} end The end instant as UTC milliseconds since Epoch.
* @returns {Promise<ClientResponse<DailyActiveUserReportResponse>>}
Expand All @@ -2863,7 +2863,7 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} emailTemplateId (Optional) The Id of the email template.
* @returns {Promise<ClientResponse<EmailTemplateResponse>>}
Expand Down Expand Up @@ -3312,10 +3312,10 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} applicationId (Optional) The application id.
* @param {UUID} applicationId (Optional) The application Id.
* @param {number} start The start instant as UTC milliseconds since Epoch.
* @param {number} end The end instant as UTC milliseconds since Epoch.
* @returns {Promise<ClientResponse<LoginReportResponse>>}
Expand All @@ -3331,7 +3331,7 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} messageTemplateId (Optional) The Id of the message template.
* @returns {Promise<ClientResponse<MessageTemplateResponse>>}
Expand Down Expand Up @@ -3397,10 +3397,10 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} applicationId (Optional) The application id.
* @param {UUID} applicationId (Optional) The application Id.
* @param {number} start The start instant as UTC milliseconds since Epoch.
* @param {number} end The end instant as UTC milliseconds since Epoch.
* @returns {Promise<ClientResponse<MonthlyActiveUserReportResponse>>}
Expand Down Expand Up @@ -3589,7 +3589,7 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} userId The Id of the user.
* @param {UUID} applicationId The Id of the application.
Expand All @@ -3605,10 +3605,10 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} applicationId (Optional) The application id.
* @param {UUID} applicationId (Optional) The application Id.
* @param {number} start The start instant as UTC milliseconds since Epoch.
* @param {number} end The end instant as UTC milliseconds since Epoch.
* @returns {Promise<ClientResponse<RegistrationReportResponse>>}
Expand Down Expand Up @@ -3799,7 +3799,7 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} userActionId (Optional) The Id of the user action.
Expand All @@ -3814,7 +3814,7 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} userActionReasonId (Optional) The Id of the user action reason.
Expand Down Expand Up @@ -3929,8 +3929,8 @@ export class FusionAuthClient {
*
* This API is useful if you want to build your own login workflow to complete a device grant.
*
* @param {string} client_id The client id.
* @param {string} client_secret The client id.
* @param {string} client_id The client Id.
* @param {string} client_secret The client Id.
* @param {string} user_code The end-user verification code.
* @returns {Promise<ClientResponse<void>>}
*/
Expand Down Expand Up @@ -4059,11 +4059,11 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} applicationId (Optional) The application id.
* @param {UUID} userId The userId id.
* @param {UUID} applicationId (Optional) The application Id.
* @param {UUID} userId The userId Id.
* @param {number} start The start instant as UTC milliseconds since Epoch.
* @param {number} end The end instant as UTC milliseconds since Epoch.
* @returns {Promise<ClientResponse<LoginReportResponse>>}
Expand All @@ -4080,11 +4080,11 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} applicationId (Optional) The application id.
* @param {string} loginId The userId id.
* @param {UUID} applicationId (Optional) The application Id.
* @param {string} loginId The userId Id.
* @param {number} start The start instant as UTC milliseconds since Epoch.
* @param {number} end The end instant as UTC milliseconds since Epoch.
* @returns {Promise<ClientResponse<LoginReportResponse>>}
Expand Down Expand Up @@ -4173,7 +4173,7 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} webhookId (Optional) The Id of the webhook.
* @returns {Promise<ClientResponse<WebhookResponse>>}
Expand Down Expand Up @@ -4439,7 +4439,7 @@ export class FusionAuthClient {
}

/**
* 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 {Array<string>} ids The entity ids to search for.
* @returns {Promise<ClientResponse<EntitySearchResponse>>}
Expand Down Expand Up @@ -4635,7 +4635,7 @@ export class FusionAuthClient {
}

/**
* 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 {Array<string>} ids The user ids to search for.
* @returns {Promise<ClientResponse<SearchResponse>>}
Expand All @@ -4651,9 +4651,9 @@ export class FusionAuthClient {
}

/**
* 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 {Array<string>} ids The user ids to search for.
* @param {Array<string>} ids The user Ids to search for.
* @returns {Promise<ClientResponse<SearchResponse>>}
*/
searchUsersByIds(ids: Array<string>): Promise<ClientResponse<SearchResponse>> {
Expand Down Expand Up @@ -4725,7 +4725,7 @@ export class FusionAuthClient {
}

/**
* 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 {UUID} emailTemplateId The Id for the template.
Expand Down Expand Up @@ -4924,16 +4924,16 @@ export class FusionAuthClient {
}

/**
* Updates an API key by given id
* Updates an API key with the given Id.
*
* @param {UUID} apiKeyId The Id of the API key to update.
* @param {APIKeyRequest} request The request object that contains all the information used to create the API Key.
* @param {UUID} keyId The Id of the API key to update.
* @param {APIKeyRequest} request The request that contains all the new API key information.
* @returns {Promise<ClientResponse<APIKeyResponse>>}
*/
updateAPIKey(apiKeyId: UUID, request: APIKeyRequest): Promise<ClientResponse<APIKeyResponse>> {
updateAPIKey(keyId: UUID, request: APIKeyRequest): Promise<ClientResponse<APIKeyResponse>> {
return this.start<APIKeyResponse, Errors>()
.withUri('/api/api-key')
.withUriSegment(apiKeyId)
.withUriSegment(keyId)
.withJSONBody(request)
.withMethod("PUT")
.go();
Expand Down Expand Up @@ -5444,7 +5444,7 @@ export class FusionAuthClient {
* If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
*
* @param {string} user_code The end-user verification code.
* @param {string} client_id The client id.
* @param {string} client_id The client Id.
* @returns {Promise<ClientResponse<void>>}
*/
validateDevice(user_code: string, client_id: string): Promise<ClientResponse<void>> {
Expand Down