From 340d5040434db030a35f67907cbcf4fb79ce4ac4 Mon Sep 17 00:00:00 2001 From: i057546 Date: Thu, 16 Jan 2025 19:37:39 +0000 Subject: [PATCH] Adds tsdocs --- packages/odata-service-inquirer/src/index.ts | 16 ++++++++-------- .../src/prompts/edmx/alp-questions.ts | 16 ++++++++-------- .../src/prompts/edmx/entity-helper.ts | 8 ++++---- .../src/prompts/edmx/questions.ts | 10 +++++----- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/packages/odata-service-inquirer/src/index.ts b/packages/odata-service-inquirer/src/index.ts index 097b4e3c7e..19c5221bad 100644 --- a/packages/odata-service-inquirer/src/index.ts +++ b/packages/odata-service-inquirer/src/index.ts @@ -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, diff --git a/packages/odata-service-inquirer/src/prompts/edmx/alp-questions.ts b/packages/odata-service-inquirer/src/prompts/edmx/alp-questions.ts index 32c87f5d83..d9922ef5c2 100644 --- a/packages/odata-service-inquirer/src/prompts/edmx/alp-questions.ts +++ b/packages/odata-service-inquirer/src/prompts/edmx/alp-questions.ts @@ -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 }]; @@ -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, diff --git a/packages/odata-service-inquirer/src/prompts/edmx/entity-helper.ts b/packages/odata-service-inquirer/src/prompts/edmx/entity-helper.ts index 581b80176e..5d64b5d81e 100644 --- a/packages/odata-service-inquirer/src/prompts/edmx/entity-helper.ts +++ b/packages/odata-service-inquirer/src/prompts/edmx/entity-helper.ts @@ -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) => { @@ -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) => { diff --git a/packages/odata-service-inquirer/src/prompts/edmx/questions.ts b/packages/odata-service-inquirer/src/prompts/edmx/questions.ts index 51e9e7c4e5..6d9524149e 100644 --- a/packages/odata-service-inquirer/src/prompts/edmx/questions.ts +++ b/packages/odata-service-inquirer/src/prompts/edmx/questions.ts @@ -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,