fix: add jsdoc comments
This commit is contained in:
@@ -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> {
|
public asGetPagedReportsResponseType(): ApiResponse<GetPagedReportsResponse> {
|
||||||
const apiResponse = this as ApiResponse<any>;
|
const apiResponse = this as ApiResponse<any>;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,19 @@
|
|||||||
import { PagedResponse } from './PagedResponse';
|
import { PagedResponse } from './PagedResponse';
|
||||||
import { type Report } from './Report';
|
import { type Report } from './Report';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class GetPagedReportsResponse - Represents a response containing a paged list of reports.
|
||||||
|
*/
|
||||||
export class GetPagedReportsResponse extends PagedResponse<Report> {
|
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(
|
constructor(
|
||||||
items: Report[],
|
items: Report[],
|
||||||
pageNumber: number,
|
pageNumber: number,
|
||||||
|
|||||||
@@ -307,6 +307,12 @@ export class OnspringClient {
|
|||||||
return apiResponse;
|
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(
|
public async getReportsByAppId(
|
||||||
appId: number,
|
appId: number,
|
||||||
pagingRequest: PagingRequest = new PagingRequest(1, 50)
|
pagingRequest: PagingRequest = new PagingRequest(1, 50)
|
||||||
|
|||||||
Reference in New Issue
Block a user