fix: added JSDoc comments for getFieldsByIds implementation
This commit is contained in:
@@ -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>> {
|
public AsFieldCollectionType(): ApiResponse<CollectionResponse<Field>> {
|
||||||
const apiResponse = this as ApiResponse<any>;
|
const apiResponse = this as ApiResponse<any>;
|
||||||
|
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ export class OnspringClient {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @method getFieldById - Gets a field by its id.
|
* @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.
|
* @returns {Promise<ApiResponse<Field>>} - A promise that resolves to an ApiResponse of type Field.
|
||||||
*/
|
*/
|
||||||
public async getFieldById(fieldId: number): Promise<ApiResponse<Field>> {
|
public async getFieldById(fieldId: number): Promise<ApiResponse<Field>> {
|
||||||
@@ -125,6 +126,11 @@ export class OnspringClient {
|
|||||||
return apiResponse.AsFieldType();
|
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(
|
public async getFieldsByIds(
|
||||||
fieldIds: number[]
|
fieldIds: number[]
|
||||||
): Promise<ApiResponse<CollectionResponse<Field>>> {
|
): Promise<ApiResponse<CollectionResponse<Field>>> {
|
||||||
|
|||||||
Reference in New Issue
Block a user