From b38a3e44aa580a8b220ae7dcf78afa6e5cf3f8d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Vannicatte?= Date: Fri, 7 Jan 2022 11:10:45 +0100 Subject: [PATCH] fix(js): add description to exported types --- .../client-analytics/src/analyticsApi.ts | 348 ++++++++++++++++++ .../client-insights/src/insightsApi.ts | 3 + .../src/personalizationApi.ts | 9 + .../client-search/src/searchApi.ts | 312 ++++++++++++++++ templates/javascript/api-single.mustache | 3 + 5 files changed, 675 insertions(+) diff --git a/clients/algoliasearch-client-javascript/client-analytics/src/analyticsApi.ts b/clients/algoliasearch-client-javascript/client-analytics/src/analyticsApi.ts index ca5aa9a451a..7508fc4d43c 100644 --- a/clients/algoliasearch-client-javascript/client-analytics/src/analyticsApi.ts +++ b/clients/algoliasearch-client-javascript/client-analytics/src/analyticsApi.ts @@ -1455,180 +1455,528 @@ export class AnalyticsApi { } export type GetAverageClickPositionProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetClickPositionsProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetClickThroughRateProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetConversationRateProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetNoClickRateProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetNoResultsRateProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetSearchesCountProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetSearchesNoClicksProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * How many items to fetch. + */ limit?: number; + /** + * From which position to start retrieving results. + */ offset?: number; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetSearchesNoResultsProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * How many items to fetch. + */ limit?: number; + /** + * From which position to start retrieving results. + */ offset?: number; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetStatusProps = { + /** + * The index name to target. + */ index: string; }; export type GetTopCountriesProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * How many items to fetch. + */ limit?: number; + /** + * From which position to start retrieving results. + */ offset?: number; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetTopFilterAttributesProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * How many items to fetch. + */ limit?: number; + /** + * From which position to start retrieving results. + */ offset?: number; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetTopFilterAttributesForSearchProps = { + /** + * The index name to target. + */ index: string; + /** + * The query term. Must match the exact user input. + */ search: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * How many items to fetch. + */ limit?: number; + /** + * From which position to start retrieving results. + */ offset?: number; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetTopFilterForAttributeProps = { + /** + * The exact name of the attribute. + */ attribute: string; + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * How many items to fetch. + */ limit?: number; + /** + * From which position to start retrieving results. + */ offset?: number; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetTopFiltersForAttributesSearchProps = { + /** + * The exact names of the attributes, separated by commas. + */ attributes: string; + /** + * The index name to target. + */ index: string; + /** + * The query term. Must match the exact user input. + */ search: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * How many items to fetch. + */ limit?: number; + /** + * From which position to start retrieving results. + */ offset?: number; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetTopFiltersNoResultsProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * How many items to fetch. + */ limit?: number; + /** + * From which position to start retrieving results. + */ offset?: number; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetTopFiltersNoResultsForSearchProps = { + /** + * The index name to target. + */ index: string; + /** + * The query term. Must match the exact user input. + */ search: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * How many items to fetch. + */ limit?: number; + /** + * From which position to start retrieving results. + */ offset?: number; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetTopHitsProps = { + /** + * The index name to target. + */ index: string; + /** + * Whether to include the click-through and conversion rates for a search. + */ clickAnalytics?: boolean; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * How many items to fetch. + */ limit?: number; + /** + * From which position to start retrieving results. + */ offset?: number; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetTopHitsForSearchProps = { + /** + * The index name to target. + */ index: string; + /** + * The query term. Must match the exact user input. + */ search: string; + /** + * Whether to include the click-through and conversion rates for a search. + */ clickAnalytics?: boolean; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * How many items to fetch. + */ limit?: number; + /** + * From which position to start retrieving results. + */ offset?: number; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetTopSearchesProps = { + /** + * The index name to target. + */ index: string; + /** + * Whether to include the click-through and conversion rates for a search. + */ clickAnalytics?: boolean; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * Reorder the results. + */ orderBy?: Record; + /** + * The sorting of the result. + */ direction?: Record; + /** + * How many items to fetch. + */ limit?: number; + /** + * From which position to start retrieving results. + */ offset?: number; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; export type GetUsersCountProps = { + /** + * The index name to target. + */ index: string; + /** + * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ startDate?: Date; + /** + * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze. + */ endDate?: Date; + /** + * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. + */ tags?: string; }; diff --git a/clients/algoliasearch-client-javascript/client-insights/src/insightsApi.ts b/clients/algoliasearch-client-javascript/client-insights/src/insightsApi.ts index 9f0ad84cdd7..293a03f58f6 100644 --- a/clients/algoliasearch-client-javascript/client-insights/src/insightsApi.ts +++ b/clients/algoliasearch-client-javascript/client-insights/src/insightsApi.ts @@ -114,5 +114,8 @@ export class InsightsApi { } export type PushEventsProps = { + /** + * The insightEvents. + */ insightEvents: InsightEvents; }; diff --git a/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts b/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts index 317d88901a0..b8658c86551 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts @@ -238,13 +238,22 @@ export class PersonalizationApi { } export type DeleteUserProfileProps = { + /** + * UserToken representing the user for which to fetch the Personalization profile. + */ userToken: string; }; export type GetUserTokenProfileProps = { + /** + * UserToken representing the user for which to fetch the Personalization profile. + */ userToken: string; }; export type SetPersonalizationStrategyProps = { + /** + * The personalizationStrategyObject. + */ personalizationStrategyObject: PersonalizationStrategyObject; }; diff --git a/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts b/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts index c5b49479962..badbe7b4584 100644 --- a/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts +++ b/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts @@ -2502,263 +2502,575 @@ export class SearchApi { } export type AddApiKeyProps = { + /** + * The apiKey. + */ apiKey: ApiKey; }; export type AddOrUpdateObjectProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * Unique identifier of an object. + */ objectID: string; + /** + * The Algolia object. + */ requestBody: { [key: string]: Record }; }; export type AppendSourceProps = { + /** + * The source to add. + */ source: Source; }; export type AssignUserIdProps = { + /** + * UserID to assign. + */ xAlgoliaUserID: Record; + /** + * The assignUserIdObject. + */ assignUserIdObject: AssignUserIdObject; }; export type BatchProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * The batchWriteObject. + */ batchWriteObject: BatchWriteObject; }; export type BatchAssignUserIdsProps = { + /** + * UserID to assign. + */ xAlgoliaUserID: Record; + /** + * The batchAssignUserIdsObject. + */ batchAssignUserIdsObject: BatchAssignUserIdsObject; }; export type BatchDictionaryEntriesProps = { + /** + * The dictionary to search in. + */ dictionaryName: 'compounds' | 'plurals' | 'stopwords'; + /** + * The batchDictionaryEntries. + */ batchDictionaryEntries: BatchDictionaryEntries; }; export type BatchRulesProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * The rule. + */ rule: Rule[]; + /** + * When true, changes are also propagated to replicas of the given indexName. + */ forwardToReplicas?: boolean; + /** + * When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept. + */ clearExistingRules?: boolean; }; export type BrowseProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * The browseRequest. + */ browseRequest?: BrowseRequest; }; export type ClearAllSynonymsProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * When true, changes are also propagated to replicas of the given indexName. + */ forwardToReplicas?: boolean; }; export type ClearObjectsProps = { + /** + * The index in which to perform the request. + */ indexName: string; }; export type ClearRulesProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * When true, changes are also propagated to replicas of the given indexName. + */ forwardToReplicas?: boolean; }; export type DeleteApiKeyProps = { + /** + * API Key string. + */ key: string; }; export type DeleteByProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * The searchParams. + */ searchParams: SearchParams; }; export type DeleteIndexProps = { + /** + * The index in which to perform the request. + */ indexName: string; }; export type DeleteObjectProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * Unique identifier of an object. + */ objectID: string; }; export type DeleteRuleProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * Unique identifier of an object. + */ objectID: string; + /** + * When true, changes are also propagated to replicas of the given indexName. + */ forwardToReplicas?: boolean; }; export type DeleteSourceProps = { + /** + * The IP range of the source. + */ source: string; }; export type DeleteSynonymProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * Unique identifier of an object. + */ objectID: string; + /** + * When true, changes are also propagated to replicas of the given indexName. + */ forwardToReplicas?: boolean; }; export type GetApiKeyProps = { + /** + * API Key string. + */ key: string; }; export type GetLogsProps = { + /** + * First entry to retrieve (zero-based). Log entries are sorted by decreasing date, therefore 0 designates the most recent log entry. + */ offset?: number; + /** + * Maximum number of entries to retrieve. The maximum allowed value is 1000. + */ length?: number; + /** + * Index for which log entries should be retrieved. When omitted, log entries are retrieved across all indices. + */ indexName?: string; + /** + * Type of log entries to retrieve. When omitted, all log entries are retrieved. + */ type?: 'all' | 'build' | 'error' | 'query'; }; export type GetObjectProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * Unique identifier of an object. + */ objectID: string; + /** + * The attributesToRetrieve. + */ attributesToRetrieve?: string[]; }; export type GetObjectsProps = { + /** + * The getObjectsObject. + */ getObjectsObject: GetObjectsObject; }; export type GetRuleProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * Unique identifier of an object. + */ objectID: string; }; export type GetSettingsProps = { + /** + * The index in which to perform the request. + */ indexName: string; }; export type GetSynonymProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * Unique identifier of an object. + */ objectID: string; }; export type GetTaskProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * Unique identifier of an task. Numeric value (up to 64bits). + */ taskID: number; }; export type GetUserIdProps = { + /** + * UserID to assign. + */ userID: Record; }; export type HasPendingMappingsProps = { + /** + * The getClusters. + */ getClusters?: boolean; }; export type ListIndicesProps = { + /** + * Requested page (zero-based). When specified, will retrieve a specific page; the page size is implicitly set to 100. When null, will retrieve all indices (no pagination). + */ page?: number; }; export type ListUserIdsProps = { + /** + * Requested page (zero-based). When specified, will retrieve a specific page; the page size is implicitly set to 100. When null, will retrieve all indices (no pagination). + */ page?: number; + /** + * Maximum number of objects to retrieve. + */ hitsPerPage?: number; }; export type MultipleBatchProps = { + /** + * The batchObject. + */ batchObject: BatchObject; }; export type MultipleQueriesProps = { + /** + * The multipleQueriesObject. + */ multipleQueriesObject: MultipleQueriesObject; }; export type OperationIndexProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * The operationIndexObject. + */ operationIndexObject: OperationIndexObject; }; export type PartialUpdateObjectProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * Unique identifier of an object. + */ objectID: string; + /** + * The Algolia object. + */ stringBuildInOperation: Array<{ [key: string]: BuildInOperation | string }>; + /** + * Creates the record if it does not exist yet. + */ createIfNotExists?: boolean; }; export type RemoveUserIdProps = { + /** + * UserID to assign. + */ userID: Record; }; export type ReplaceSourcesProps = { + /** + * The sources to allow. + */ source: Source[]; }; export type RestoreApiKeyProps = { + /** + * API Key string. + */ key: string; }; export type SaveObjectProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * The Algolia object. + */ requestBody: { [key: string]: Record }; }; export type SaveRuleProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * Unique identifier of an object. + */ objectID: string; + /** + * The rule. + */ rule: Rule; + /** + * When true, changes are also propagated to replicas of the given indexName. + */ forwardToReplicas?: boolean; }; export type SaveSynonymProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * Unique identifier of an object. + */ objectID: string; + /** + * The synonymHit. + */ synonymHit: SynonymHit; + /** + * When true, changes are also propagated to replicas of the given indexName. + */ forwardToReplicas?: boolean; }; export type SaveSynonymsProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * The synonymHit. + */ synonymHit: SynonymHit[]; + /** + * When true, changes are also propagated to replicas of the given indexName. + */ forwardToReplicas?: boolean; + /** + * Replace all synonyms of the index with the ones sent with this request. + */ replaceExistingSynonyms?: boolean; }; export type SearchProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * The searchParams. + */ searchParams: SearchParams; }; export type SearchDictionaryEntriesProps = { + /** + * The dictionary to search in. + */ dictionaryName: 'compounds' | 'plurals' | 'stopwords'; + /** + * The searchDictionaryEntries. + */ searchDictionaryEntries: SearchDictionaryEntries; }; export type SearchForFacetValuesProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * The facet name. + */ facetName: string; + /** + * The searchForFacetValuesRequest. + */ searchForFacetValuesRequest?: SearchForFacetValuesRequest; }; export type SearchRulesProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * The searchRulesParams. + */ searchRulesParams: SearchRulesParams; }; export type SearchSynonymsProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * Search for specific synonyms matching this string. + */ query?: string; + /** + * Only search for specific types of synonyms. + */ type?: | 'altcorrection1' | 'altcorrection2' | 'onewaysynonym' | 'placeholder' | 'synonym'; + /** + * Requested page (zero-based). When specified, will retrieve a specific page; the page size is implicitly set to 100. When null, will retrieve all indices (no pagination). + */ page?: number; + /** + * Maximum number of objects to retrieve. + */ hitsPerPage?: number; }; export type SearchUserIdsProps = { + /** + * The searchUserIdsObject. + */ searchUserIdsObject: SearchUserIdsObject; }; export type SetDictionarySettingsProps = { + /** + * The dictionarySettingsRequest. + */ dictionarySettingsRequest: DictionarySettingsRequest; }; export type SetSettingsProps = { + /** + * The index in which to perform the request. + */ indexName: string; + /** + * The indexSettings. + */ indexSettings: IndexSettings; + /** + * When true, changes are also propagated to replicas of the given indexName. + */ forwardToReplicas?: boolean; }; export type UpdateApiKeyProps = { + /** + * API Key string. + */ key: string; + /** + * The apiKey. + */ apiKey: ApiKey; }; diff --git a/templates/javascript/api-single.mustache b/templates/javascript/api-single.mustache index 5a0416ee550..aad28652c63 100644 --- a/templates/javascript/api-single.mustache +++ b/templates/javascript/api-single.mustache @@ -210,6 +210,9 @@ export class {{classname}} { {{#allParams.0}} export type {{#lambda.titlecase}}{{nickname}}{{/lambda.titlecase}}Props = { {{#allParams}} + /** + * {{^description}}The {{paramName}}{{/description}}{{#description}}{{{description}}}{{/description}} + */ {{paramName}}{{^required}}?{{/required}}: {{{dataType}}}; {{/allParams}} }