fix: add jsdoc comments

This commit is contained in:
StevanFreeborn
2023-02-08 23:42:19 -06:00
parent 58de996f1e
commit 3168a708bf
3 changed files with 22 additions and 0 deletions
+4
View File
@@ -277,6 +277,10 @@ export class ApiResponse<T> {
);
}
/**
* @method asGetPagedReportsResponseType - Converts the ApiResponse to an ApiResponse<GetPagedReportsResponse>.
* @returns {ApiResponse<GetPagedReportsResponse>} - An ApiResponse<GetPagedReportsResponse>.
*/
public asGetPagedReportsResponseType(): ApiResponse<GetPagedReportsResponse> {
const apiResponse = this as ApiResponse<any>;
+12
View File
@@ -1,7 +1,19 @@
import { PagedResponse } from './PagedResponse';
import { type Report } from './Report';
/**
* @class GetPagedReportsResponse - Represents a response containing a paged list of reports.
*/
export class GetPagedReportsResponse extends PagedResponse<Report> {
/**
* @constructor - Creates a new instance of the GetPagedReportsResponse class.
* @param {Report[]} items - The list of reports.
* @param {number} pageNumber - The page number.
* @param {number} pageSize - The page size.
* @param {number} totalPages - The total number of pages.
* @param {number} totalRecords - The total number of records.
* @returns {GetPagedReportsResponse} - A new instance of the GetPagedReportsResponse class.
*/
constructor(
items: Report[],
pageNumber: number,
+6
View File
@@ -307,6 +307,12 @@ export class OnspringClient {
return apiResponse;
}
/**
* @method getReportsByAppId - Gets a paged list of reports by the app id.
* @param {number} appId - The id of the app to get the reports for.
* @param {PagingRequest} pagingRequest - The paging request that will be used to get the reports.
* @returns {Promise<ApiResponse<GetPagedReportsResponse>>} - A promise that resolves to an ApiResponse of type GetPagedReportsResponse.
*/
public async getReportsByAppId(
appId: number,
pagingRequest: PagingRequest = new PagingRequest(1, 50)