fix: corrected JSDoc comments

This commit is contained in:
StevanFreeborn
2023-02-02 22:52:14 -06:00
parent a1d3683603
commit 923cb27c33
2 changed files with 61 additions and 13 deletions
+18 -13
View File
@@ -58,8 +58,8 @@ export class OnspringClient {
/**
* @method getApps - Gets a paged list of apps.
* @param pagingRequest - The paging request that will be used to get the apps.
* @returns - A promise that resolves to an ApiResponse of type GetPagedAppsResponse.
* @param {PagingRequest} pagingRequest - The paging request that will be used to get the apps.
* @returns {Promise<ApiResponse<GetPagedAppsResponse>>} - A promise that resolves to an ApiResponse of type GetPagedAppsResponse.
*/
public async getApps(
pagingRequest: PagingRequest = new PagingRequest(1, 50)
@@ -77,8 +77,8 @@ export class OnspringClient {
/**
* @method getAppById - Gets an app by its id.
* @param appId - The id of the app to get.
* @returns - A promise that resolves to an ApiResponse of type App.
* @param {number} appId - The id of the app to get.
* @returns {Promise<ApiResponse<App>>} - A promise that resolves to an ApiResponse of type App.
*/
public async getAppById(appId: number): Promise<ApiResponse<App>> {
const endpoint = EndpointFactory.getAppByIdEndpoint(appId);
@@ -94,14 +94,14 @@ export class OnspringClient {
/**
* @method getAppsByIds - Gets a list of apps by their ids.
* @param getAppsByIds - The ids of the apps to get.
* @returns - A promise that resolves to an ApiResponse of type CollectionResponse<App>.
* @param {number[]} appIds - The ids of the apps to get.
* @returns {Promise<ApiResponse<CollectionResponse<App>>>} - A promise that resolves to an ApiResponse of type CollectionResponse<App>.
*/
public async getAppsByIds(
getAppsByIds: number[]
appIds: number[]
): Promise<ApiResponse<CollectionResponse<App>>> {
const endpoint = EndpointFactory.getAppsByIdsEndpoint();
const apiResponse = await this.post<any>(endpoint, getAppsByIds);
const apiResponse = await this.post<any>(endpoint, appIds);
if (apiResponse.isSuccessful === false) {
return apiResponse;
@@ -110,6 +110,11 @@ export class OnspringClient {
return apiResponse.AsAppCollectionType();
}
/**
* @method getFields - Gets a paged list of fields.
* @param {PagingRequest} pagingRequest - The paging request that will be used to get the fields.
* @returns {Promise<ApiResponse<Field>>} - A promise that resolves to an ApiResponse of type Field.
*/
public async getFieldById(fieldId: number): Promise<ApiResponse<Field>> {
const endpoint = EndpointFactory.getFieldByIdEndpoint(fieldId);
const apiResponse = await this.get<any>(endpoint);
@@ -137,11 +142,11 @@ export class OnspringClient {
}
/**
*
* @param endpoint - The endpoint that will be used to make the request.
* @param data - The data that will be sent with the request.
* @param config - The configuration that will be used to make the request.
* @returns - A promise that resolves to an ApiResponse of type T.
* @method post - Makes a POST request to the specified endpoint.
* @param {string} endpoint - The endpoint that will be used to make the request.
* @param {any} data - The data that will be sent with the request.
* @param {AxiosRequestConfig} config - The configuration that will be used to make the request.
* @returns {Promise<ApiResponse<T>>} - A promise that resolves to an ApiResponse of type T.
*/
private async post<T>(
endpoint: string,