diff --git a/src/models/ApiResponse.ts b/src/models/ApiResponse.ts index 43936b5..fc57302 100644 --- a/src/models/ApiResponse.ts +++ b/src/models/ApiResponse.ts @@ -277,6 +277,10 @@ export class ApiResponse { ); } + /** + * @method asGetPagedReportsResponseType - Converts the ApiResponse to an ApiResponse. + * @returns {ApiResponse} - An ApiResponse. + */ public asGetPagedReportsResponseType(): ApiResponse { const apiResponse = this as ApiResponse; diff --git a/src/models/GetPagedReportsResponse.ts b/src/models/GetPagedReportsResponse.ts index aa023a5..c0efb25 100644 --- a/src/models/GetPagedReportsResponse.ts +++ b/src/models/GetPagedReportsResponse.ts @@ -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 { + /** + * @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, diff --git a/src/models/OnspringClient.ts b/src/models/OnspringClient.ts index 717cb7f..c046c66 100644 --- a/src/models/OnspringClient.ts +++ b/src/models/OnspringClient.ts @@ -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>} - A promise that resolves to an ApiResponse of type GetPagedReportsResponse. + */ public async getReportsByAppId( appId: number, pagingRequest: PagingRequest = new PagingRequest(1, 50)