Skip to content

Commit

Permalink
Adds tsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
IainSAP committed Jan 16, 2025
1 parent 36d4505 commit 340d504
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
16 changes: 8 additions & 8 deletions packages/odata-service-inquirer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ async function getSystemSelectionQuestions(
* Get the questions that may be used to prompt for entity selection, table configuration, annotation generation, and ALP specific table configuration.
* Since these are releated to service metadata processing and entity selection, they are grouped together.
*
* @param metadata
* @param templateType
* @param isCapService
* @param promptOptions - options that can control some of the prompt behavior. See {@link EntityPromptOptions} for details
* @param annotations - annotations to be used for entity selection, only used for analytical list page presentation variant qualifier choices when the edmx odata version is `2`
* @param logger
* @param isYUI
* @returns the prompts
* @param metadata the metadata (edmx) string from which to extract entity choices
* @param templateType the template type which will define the type of prompts and their choices
* @param isCapService if true, the service is a CAP service, some prompts will be adjusted accordingly
* @param promptOptions options that can control some of the prompt behavior. See {@link EntityPromptOptions} for details
* @param annotations annotations to be used for entity selection, only used for analytical list page presentation variant qualifier choices when the edmx odata version is `2`
* @param logger a logger compatible with the {@link Logger} interface
* @param isYUI if true, the prompt is being called from the Yeoman UI extension host
* @returns the prompts which may be used to prompt for entity selection, table configuration, annotation generation, and ALP specific table configuration
*/
function getEntityRelatedPrompts(
metadata: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import { EntityPromptNames } from '../../types';
import { xmlToJson } from '../../utils';

/**
* Return the annotation `selectionPresentationVariant.qualifier` properties as prompt choices for the specified annotations and entityType.
* Return the annotation `UI.selectionPresentationVariant.qualifier` properties as prompt choices for the specified annotations and entityType.
*
* @param annotations
* @param entityType
* @returns
* @param annotations the annotations in which to search for the annotation: `UI.selectionPresentationVariant.qualifier`
* @param entityType the entityType of the annotations target in which to search for the annotation: `UI.selectionPresentationVariant.qualifier`
* @returns the matching `UI.selectionPresentationVariant` qualifers as prompt choices
*/
function getQualifierChoices(annotations: Annotations, entityType: string): ChoiceOptions[] {
const qualifierChoices: ChoiceOptions[] = [{ name: t('texts.choiceNameNone'), value: undefined }];
Expand Down Expand Up @@ -53,10 +53,10 @@ function getQualifierChoices(annotations: Annotations, entityType: string): Choi
/**
* Get questions that related to generation of Analytical List Page type applications.
*
* @param odataVersion
* @param annotations
* @param hideTableLayoutPrompts
* @returns
* @param odataVersion odata version '2' or '4' will the table layout prompts to be shown
* @param annotations used to determine if the select presentation qualifier prompt should be shown
* @param hideTableLayoutPrompts hide the table layout prompts, certain consumers do not need these prompts
* @returns alp specific questions
*/
export function getAnalyticListPageQuestions(
odataVersion: OdataVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ export function getNavigationEntityChoices(
/**
* Returns only entity sets that have the `Aggregation.ApplySupported` annotation term with the `Transformations` property.
*
* @param entitySets
* @returns
* @param entitySets the entity sets to filter
* @returns the filtered entity sets
*/
function filterAggregateTransformations(entitySets: EntitySet[]): EntitySet[] {
return entitySets.filter((entitySet) => {
Expand All @@ -181,8 +181,8 @@ function filterAggregateTransformations(entitySets: EntitySet[]): EntitySet[] {
/**
* Returns only entities that have a type property of 'HasDraftEnabled'.
*
* @param entitySets
* @returns
* @param entitySets the entity sets to filter by draft enabled entities
* @returns the filtered entity sets
*/
function filterDraftEnabledEntities(entitySets: EntitySet[]): EntitySet[] | undefined {
return entitySets.filter((entitySet) => {
Expand Down
10 changes: 5 additions & 5 deletions packages/odata-service-inquirer/src/prompts/edmx/questions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@ function getEdmxSizeInKb(edmx: string): number {
/**
* Get the questions that may be used to prompt for adding annotations. Only a subset of the questions will be returned based on the template type and OData version.
*
* @param metadata
* @param templateType
* @param odataVersion
* @param isCapService
* @returns
* @param metadata the metadata (edmx) string of the service, used to determine if the metadata is large and the user should be warned about processing time
* @param templateType only specific template types will have line item annotations
* @param odataVersion only specific OData versions will have line item annotations
* @param isCapService whether the service is a CAP service or not
* @returns the annotation generation questions
*/
function getAddAnnotationQuestions(
metadata: string,
Expand Down

0 comments on commit 340d504

Please sign in to comment.