fix: added JSDoc comments for getFieldsByIds implementation

This commit is contained in:
StevanFreeborn
2023-02-03 11:25:33 -06:00
parent 88197d71b8
commit 0559f60726
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -134,6 +134,10 @@ export class ApiResponse<T> {
);
}
/**
* @method AsFieldCollectionType - Converts the ApiResponse to an ApiResponse<CollectionResponse<Field>>.
* @returns {ApiResponse<CollectionResponse<Field>>} - An ApiResponse<CollectionResponse<Field>>.
*/
public AsFieldCollectionType(): ApiResponse<CollectionResponse<Field>> {
const apiResponse = this as ApiResponse<any>;
+6
View File
@@ -112,6 +112,7 @@ export class OnspringClient {
/**
* @method getFieldById - Gets a field by its id.
* @param {number} fieldId - The id of the field to get.
* @returns {Promise<ApiResponse<Field>>} - A promise that resolves to an ApiResponse of type Field.
*/
public async getFieldById(fieldId: number): Promise<ApiResponse<Field>> {
@@ -125,6 +126,11 @@ export class OnspringClient {
return apiResponse.AsFieldType();
}
/**
* @method getFieldsByIds - Gets a list of fields by their ids.
* @param {number[]} fieldIds - The ids of the fields to get.
* @returns {Promise<ApiResponse<CollectionResponse<Field>>>} - A promise that resolves to an ApiResponse of type CollectionResponse<Field>.
*/
public async getFieldsByIds(
fieldIds: number[]
): Promise<ApiResponse<CollectionResponse<Field>>> {