/** API is not yet fully migrated to FQDN entity */ interface SiteDocument { /** the document payload */ document?: Record | null; } interface UpdateInternalDocumentsEvent extends UpdateInternalDocumentsEventOperationOneOf { /** insert/update documents */ update?: InternalDocumentUpdateOperation; /** delete by document ids */ deleteByIds?: DeleteByIdsOperation; /** delete documents matching filter */ deleteByFilter?: DeleteByFilterOperation; /** update internal documents matching filter */ updateByFilter?: InternalDocumentUpdateByFilterOperation; /** update only existing documents */ updateExisting?: InternalUpdateExistingOperation; /** insert/update documents with versioning */ versionedUpdate?: VersionedDocumentUpdateOperation; /** delete by document ids with versioning */ versionedDeleteByIds?: VersionedDeleteByIdsOperation; /** type of the documents */ documentType?: string; /** language of the documents (mandatory) */ language?: string | null; /** * one or more search documents * @deprecated */ addDocuments?: InternalDocument[]; /** * one or more ids of indexed documents to be removed. Removal will happen before addition (if both provided) * @deprecated */ removeDocumentIds?: string[]; /** id to pass to processing notification */ correlationId?: string | null; /** when event was created / issued */ issuedAt?: Date | null; } /** @oneof */ interface UpdateInternalDocumentsEventOperationOneOf { /** insert/update documents */ update?: InternalDocumentUpdateOperation; /** delete by document ids */ deleteByIds?: DeleteByIdsOperation; /** delete documents matching filter */ deleteByFilter?: DeleteByFilterOperation; /** update internal documents matching filter */ updateByFilter?: InternalDocumentUpdateByFilterOperation; /** update only existing documents */ updateExisting?: InternalUpdateExistingOperation; /** insert/update documents with versioning */ versionedUpdate?: VersionedDocumentUpdateOperation; /** delete by document ids with versioning */ versionedDeleteByIds?: VersionedDeleteByIdsOperation; } interface InternalDocument { /** document with mandatory fields (id) and with fields specific to the type of the document */ document?: Record | null; } interface InternalDocumentUpdateOperation { /** documents to index or update */ documents?: InternalDocument[]; } interface DeleteByIdsOperation { /** ids of the documents to delete */ documentIds?: string[]; } interface DeleteByFilterOperation { /** documents matching this filter wil be deleted. only filterable documents defined in document_type can be used for filtering */ filter?: Record | null; } interface InternalDocumentUpdateByFilterOperation { /** documents matching this filter will be updated */ filter?: Record | null; /** partial document to apply */ document?: InternalDocument; } interface InternalUpdateExistingOperation { /** documents to update */ documents?: InternalDocument[]; } interface VersionedDocumentUpdateOperation { /** documents to create or overwrite */ documents?: InternalDocument[]; /** versioning mode to use instead of default */ versioningMode?: VersioningMode; } declare enum VersioningMode { /** use default versioning mode agreed with search team */ DEFAULT = "DEFAULT", /** execute only if version is greater than existing */ GREATER_THAN = "GREATER_THAN", /** execute only if version is greater or equal to existing */ GREATER_OR_EQUAL = "GREATER_OR_EQUAL" } interface VersionedDeleteByIdsOperation { /** ids with version of the documents to delete */ documentIds?: VersionedDocumentId[]; } interface VersionedDocumentId { /** document id */ documentId?: string; /** document version */ version?: string; /** versioning mode to use instead of default */ versioningMode?: VersioningMode; } interface UpdateDocumentsEvent extends UpdateDocumentsEventOperationOneOf { /** insert/update documents */ update?: DocumentUpdateOperation; /** delete by document ids */ deleteByIds?: V1DeleteByIdsOperation; /** delete documents matching filter */ deleteByFilter?: V1DeleteByFilterOperation; /** update documents matching filter */ updateByFilter?: UpdateByFilterOperation; /** update only existing documents */ updateExisting?: UpdateExistingOperation; /** application which owns documents */ appDefId?: string | null; /** type of the documents */ documentType?: string | null; /** language of the documents */ language?: string | null; /** site documents belong to */ msId?: string | null; } /** @oneof */ interface UpdateDocumentsEventOperationOneOf { /** insert/update documents */ update?: DocumentUpdateOperation; /** delete by document ids */ deleteByIds?: V1DeleteByIdsOperation; /** delete documents matching filter */ deleteByFilter?: V1DeleteByFilterOperation; /** update documents matching filter */ updateByFilter?: UpdateByFilterOperation; /** update only existing documents */ updateExisting?: UpdateExistingOperation; } interface DocumentUpdateOperation { /** documents to index or update */ documents?: IndexDocument[]; } interface IndexDocument { /** data bag with non-searchable fields (url, image) */ payload?: DocumentPayload; /** what type of users should documents be visible to */ exposure?: Enum; /** document with mandatory fields (id, title, description) and with fields specific to the type of the document */ document?: Record | null; /** what member groups is the document exposed to. Used only with GROUP_PROTECTED exposure */ permittedMemberGroups?: string[]; /** if true SEO is disabled for this document */ seoHidden?: boolean | null; /** if true the page is a lightbox popup */ isPopup?: boolean | null; } interface DocumentPayload { /** url of the page representing the document */ url?: string | null; /** image which represents the document */ documentImage?: DocumentImage; } interface DocumentImage { /** the name of the image */ name?: string; /** the width of the image */ width?: number; /** the height of the image */ height?: number; } declare enum Enum { /** Default value. Means that permission not set */ UNKNOWN = "UNKNOWN", /** Protected exposure. Exposed to members and owners */ PROTECTED = "PROTECTED", /** Private exposure. Exposed to owners */ PRIVATE = "PRIVATE", /** Public exposure. Visible to everyone */ PUBLIC = "PUBLIC", /** Used for partial updates, to state that exposure is not changing */ UNCHANGED = "UNCHANGED", /** Protected to members of permitted groups and owners */ GROUP_PROTECTED = "GROUP_PROTECTED" } interface V1DeleteByIdsOperation { /** ids of the documents to delete */ documentIds?: string[]; } interface V1DeleteByFilterOperation { /** documents matching this filter wil be deleted. only filterable documents defined in document_type can be used for filtering */ filter?: Record | null; } interface UpdateByFilterOperation { /** documents matching this filter will be updated */ filter?: Record | null; /** partial document to apply */ document?: IndexDocument; } interface UpdateExistingOperation { /** documents to update */ documents?: IndexDocument[]; } interface Empty { } interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface SearchRequest { /** Text to search for. All searchable fields will be searched. */ query?: string | null; /** Document type of documents to search for. All document types are searched if not provided. */ documentType?: string | null; /** Fields to order by. */ ordering?: OrderingClauses; /** Paging parameters. */ paging?: SearchPaging; /** Language to search in. */ language?: string | null; /** Filter in platformized query language (for example {'field': {'$eq': 'value'}}) */ filter?: Record | null; /** The facets to retrieve. */ facets?: FacetClauses; /** Enable fuzzy search (eg. query 'kalvin clein' will match document with 'calvin klein' in title). */ fuzzy?: boolean | null; /** Highlight texts matching the query. Highlighted text will be wrapped with tag. Defaults to true if not provided. */ highlight?: boolean | null; /** Searchable fields to search in. If not provided, search is executed on all searchable fields in schema */ searchFields?: string[]; /** A list of fields to include in the result set. If not provided, all fields of schema will be included. */ fields?: string[]; /** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`, `result-format`. */ properties?: SearchProperty[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; } interface OrderingClauses { ordering?: OrderingClause[]; } interface OrderingClause { fieldName?: string | null; direction?: Direction; } declare enum Direction { UninitializedDirection = "UninitializedDirection", ASC = "ASC", DESC = "DESC" } interface SearchPaging { /** * Number of items to skip in the result set. * @deprecated */ skip?: number; /** Number of items to fetch (effectively page size). */ limit?: number; /** Number of items to skip in the result set. */ offset?: number; } interface FacetClauses { /** Each entry represents a single facet with parameters. */ clauses?: FacetClause[]; } interface FacetClause extends FacetClauseClauseOneOf { term?: TermFacet; aggregation?: AggregationFacet; hierarchical?: HierarchicalFacet; } /** @oneof */ interface FacetClauseClauseOneOf { term?: TermFacet; aggregation?: AggregationFacet; hierarchical?: HierarchicalFacet; } declare enum Aggregation { MIN = "MIN", MAX = "MAX", SUM = "SUM" } interface HierarchicalFacet extends HierarchicalFacetClauseOneOf { term?: TermFacet; aggregation?: AggregationFacet; nestedAggregation?: HierarchicalFacet; } /** @oneof */ interface HierarchicalFacetClauseOneOf { term?: TermFacet; aggregation?: AggregationFacet; } interface TermFacet { /** The name of the faceted attribute. */ name?: string; /** Limit the number of facet values returned. Default is 10. */ limit?: number | null; } interface AggregationFacet { /** The name of the faceted attribute. */ name?: string; /** Aggregation type. */ aggregation?: Aggregation; } interface SearchProperty { name?: string; value?: any; } interface SearchResponse { /** Documents matching filter and query. */ documents?: Record[] | null; nextPage?: NextPageResponse; /** * Facets provide "counts in categories" view. For example searching for "Nike" would return * (Shoes, 5), (Socks, 2) indicating numbers for matching by each faceted field. */ facets?: FacetsResponse[]; } interface NextPageResponse { /** Total number of items across all pages */ total?: number; /** The number of items to skip */ skip?: number; /** The number of items to retrieve in one page */ limit?: number; } interface FacetsResponse extends FacetsResponseResponseOneOf { terms?: TermAggregationResponse; minAggregation?: MinAggregationResponse; maxAggregation?: MaxAggregationResponse; minMaxAggregation?: MinMaxAggregationResponse; hierarchicalAggregation?: HierarchicalAggregationResponse; sumAggregation?: SumAggregationResponse; } /** @oneof */ interface FacetsResponseResponseOneOf { terms?: TermAggregationResponse; minAggregation?: MinAggregationResponse; maxAggregation?: MaxAggregationResponse; minMaxAggregation?: MinMaxAggregationResponse; hierarchicalAggregation?: HierarchicalAggregationResponse; sumAggregation?: SumAggregationResponse; } interface FacetCountResponse { /** Facet field value (for example "Shoes", "Socks") */ facetValue?: string; /** Document count within the group */ count?: number; } interface Value { value?: string; facets?: FacetsResponse; count?: number; } interface TermAggregationResponse { /** Facet field (for example productCategory) */ facet?: string; /** Facet values and document counts */ facets?: FacetCountResponse[]; } interface MinAggregationResponse { /** Facet field (for example productPrice) */ facet?: string; /** The minimum value across all documents */ minValue?: number | null; } interface MaxAggregationResponse { /** Facet field (for example productPrice) */ facet?: string; /** The maximum value across all documents */ maxValue?: number | null; } interface MinMaxAggregationResponse { /** Facet field (for example productPrice) */ facet?: string; /** The minimum value across all documents */ minValue?: number | null; /** The maximum value across all documents */ maxValue?: number | null; } interface HierarchicalAggregationResponse { facet?: string; values?: Value[]; } interface SumAggregationResponse { /** Facet field (for example productPrice) */ facet?: string; /** The sum value across all documents */ value?: number | null; } interface FederatedSearchRequest { /** Query phrase to use. */ query?: string | null; /** Language to search in. */ language?: string | null; /** Limit of documents to return per document type. */ limit?: number | null; /** Enable fuzzy search (for example query 'kalvin clein' will match document with 'calvin klein' in title). */ fuzzy?: boolean | null; /** Highlight texts matching the query. Highlighted text will be wrapped with tag. Defaults to true if not provided. */ highlight?: boolean | null; /** Searchable fields to search in. If not provided, search is executed on all searchable fields in schemas */ searchFields?: string[]; /** Document types to search in. If not provided, search is executed on all document types enabled for the site */ documentTypes?: string[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; /** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`, `result-format`. */ properties?: SearchProperty[]; } interface FederatedSearchResponse { /** Search results from multiple indexes. */ results?: FederatedSearchDocuments[]; } interface FederatedSearchDocuments { /** Document type of documents */ documentType?: string | null; /** Documents of document type */ documents?: Record[] | null; /** Total count of matching documents for document type */ total?: number; } interface SuggestRequest { /** Text to search for. Fields configured in suggester configuration will be searched. */ query?: string | null; /** Document type of documents to search for. All document types are searched if not provided. */ documentType?: string | null; /** Fields to order by. */ ordering?: OrderingClauses; /** Number of suggested document to return. */ limit?: number; /** Language to search in. */ language?: string | null; /** Filter in platformized query language (for example {'field': {'$eq': 'value'}}) */ filter?: Record | null; /** Searchable fields to search in. If not provided, search is executed on all suggestable fields in schema */ searchFields?: string[]; /** A list of fields to include in the result set. If not provided, all fields of schema will be included. */ fields?: string[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; /** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`, `result-format`. */ properties?: SearchProperty[]; } interface SuggestResponse { /** Suggested documents. */ documents?: Record[] | null; } interface FederatedSuggestRequest { /** Text to search for. Fields configured in suggester configuration will be searched. */ query?: string | null; /** Language to search in. */ language?: string | null; /** Number of suggested document to return per document type. */ limit?: number; /** Searchable fields to search in. If not provided, search is executed on all suggestable fields in schemas */ searchFields?: string[]; /** Document types to search in. If not provided, search is executed on all document types enabled for the site */ documentTypes?: string[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; /** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`, `result-format`. */ properties?: SearchProperty[]; } interface FederatedSuggestResponse { /** Suggest results from multiple indexes. */ results?: FederatedSuggestDocuments[]; } interface FederatedSuggestDocuments { /** Document type of documents */ documentType?: string | null; /** Documents of document type */ documents?: Record[] | null; } interface RelatedRequest { /** ID of the document to fetch related documents for. */ documentId?: string | null; /** Document type of the document. */ documentType?: string | null; /** Fields to order by. */ ordering?: OrderingClauses; /** Language to search in. */ language?: string | null; /** Filter in platformized query language (for example {'field': {'$eq': 'value'}}). */ filter?: Record | null; /** Searchable fields to compare documents by. If not provided, all searchable fields in schema are used */ searchFields?: string[]; /** A list of fields to include in the result set. If not provided, all fields of schema will be included. */ fields?: string[]; /** Number of related documents to return */ limit?: number; /** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`. */ properties?: SearchProperty[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; } interface RelatedResponse { /** Documents matching filter and query. */ documents?: Record[] | null; } interface AutocompleteRequest { /** Query phrase to fetch completions for. */ query?: string | null; /** Document type to use to search for phrases. */ documentType?: string | null; /** Limit of phrases to fetch. */ limit?: number; /** Language to search in. */ language?: string | null; /** Filter in platfromized query language (for example {'field': {'$eq': 'value'}}) */ filter?: Record | null; /** Searchable fields to use for query completion. If not provided, all searchable fields in schema are used */ searchFields?: string[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; } interface AutocompleteResponse { /** Suggested phrases. */ values?: AutocompleteResponseValue[]; } interface AutocompleteResponseValue { /** Suggested phrase. */ query?: string; } interface FederatedAutocompleteRequest { /** Query phrase to fetch completions for. */ query?: string | null; /** Language to search in. */ language?: string | null; /** Number of queries to return per document type. */ limit?: number; /** Searchable fields to search in. If not provided, search is executed on all autocompletable fields in schemas */ searchFields?: string[]; /** Document types to autocomplete in. If not provided, autocomplete is executed on all document types enabled for the site */ documentTypes?: string[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; } interface FederatedAutocompleteResponse { /** Suggested phrases from multiple indexes */ results?: FederatedAutocompleteResults[]; } interface FederatedAutocompleteResults { /** Document type of queries */ documentType?: string | null; /** Suggested phrases */ values?: AutocompleteResponseValue[]; } interface TrendingRequest { documentTypes?: string[]; language?: string | null; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; /** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`, `result-format`. */ properties?: SearchProperty[]; } interface TrendingResponse { results?: TrendingItems[]; } interface TrendingItems { documentType?: string; documents?: Record[] | null; } interface NextPageResponseNonNullableFields { total: number; skip: number; limit: number; } interface FacetCountResponseNonNullableFields { facetValue: string; count: number; } interface TermAggregationResponseNonNullableFields { facet: string; facets: FacetCountResponseNonNullableFields[]; } interface MinAggregationResponseNonNullableFields { facet: string; } interface MaxAggregationResponseNonNullableFields { facet: string; } interface MinMaxAggregationResponseNonNullableFields { facet: string; } interface ValueNonNullableFields { value: string; facets?: FacetsResponseNonNullableFields; count: number; } interface HierarchicalAggregationResponseNonNullableFields { facet: string; values: ValueNonNullableFields[]; } interface SumAggregationResponseNonNullableFields { facet: string; } interface FacetsResponseNonNullableFields { terms?: TermAggregationResponseNonNullableFields; minAggregation?: MinAggregationResponseNonNullableFields; maxAggregation?: MaxAggregationResponseNonNullableFields; minMaxAggregation?: MinMaxAggregationResponseNonNullableFields; hierarchicalAggregation?: HierarchicalAggregationResponseNonNullableFields; sumAggregation?: SumAggregationResponseNonNullableFields; } interface SearchResponseNonNullableFields { nextPage?: NextPageResponseNonNullableFields; facets: FacetsResponseNonNullableFields[]; } interface FederatedSearchDocumentsNonNullableFields { total: number; } interface FederatedSearchResponseNonNullableFields { results: FederatedSearchDocumentsNonNullableFields[]; } interface AutocompleteResponseValueNonNullableFields { query: string; } interface AutocompleteResponseNonNullableFields { values: AutocompleteResponseValueNonNullableFields[]; } interface FederatedAutocompleteResultsNonNullableFields { values: AutocompleteResponseValueNonNullableFields[]; } interface FederatedAutocompleteResponseNonNullableFields { results: FederatedAutocompleteResultsNonNullableFields[]; } interface TrendingItemsNonNullableFields { documentType: string; } interface TrendingResponseNonNullableFields { results: TrendingItemsNonNullableFields[]; } /** * Executes a regular search query. * If you are unsure, this is likely the search method you want to used. * @public * @documentationMaturity preview */ declare function search(options?: SearchOptions): Promise; interface SearchOptions { /** Text to search for. All searchable fields will be searched. */ query?: string | null; /** Document type of documents to search for. All document types are searched if not provided. */ documentType?: string | null; /** Fields to order by. */ ordering?: OrderingClauses; /** Paging parameters. */ paging?: SearchPaging; /** Language to search in. */ language?: string | null; /** Filter in platformized query language (for example {'field': {'$eq': 'value'}}) */ filter?: Record | null; /** The facets to retrieve. */ facets?: FacetClauses; /** Enable fuzzy search (eg. query 'kalvin clein' will match document with 'calvin klein' in title). */ fuzzy?: boolean | null; /** Highlight texts matching the query. Highlighted text will be wrapped with tag. Defaults to true if not provided. */ highlight?: boolean | null; /** Searchable fields to search in. If not provided, search is executed on all searchable fields in schema */ searchFields?: string[]; /** A list of fields to include in the result set. If not provided, all fields of schema will be included. */ fields?: string[]; /** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`, `result-format`. */ properties?: SearchProperty[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; } /** * Searches in multiple document types at once. * @public * @documentationMaturity preview */ declare function federatedSearch(options?: FederatedSearchOptions): Promise; interface FederatedSearchOptions { /** Query phrase to use. */ query?: string | null; /** Language to search in. */ language?: string | null; /** Limit of documents to return per document type. */ limit?: number | null; /** Enable fuzzy search (for example query 'kalvin clein' will match document with 'calvin klein' in title). */ fuzzy?: boolean | null; /** Highlight texts matching the query. Highlighted text will be wrapped with tag. Defaults to true if not provided. */ highlight?: boolean | null; /** Searchable fields to search in. If not provided, search is executed on all searchable fields in schemas */ searchFields?: string[]; /** Document types to search in. If not provided, search is executed on all document types enabled for the site */ documentTypes?: string[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; /** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`, `result-format`. */ properties?: SearchProperty[]; } /** * Executes search query to fetch suggested items. Unlike search query suggest will match * partial phrases (for example "blu" will match documents containing "blue", "blues" and "blunt"). * Phrase needs to be at least 3 symbols long. Suggestions can also perform optimisations in search * results and generally do not guarantee the same level of quality as regular Search endpoint. * @public * @documentationMaturity preview */ declare function suggest(options?: SuggestOptions): Promise; interface SuggestOptions { /** Text to search for. Fields configured in suggester configuration will be searched. */ query?: string | null; /** Document type of documents to search for. All document types are searched if not provided. */ documentType?: string | null; /** Fields to order by. */ ordering?: OrderingClauses; /** Number of suggested document to return. */ limit?: number; /** Language to search in. */ language?: string | null; /** Filter in platformized query language (for example {'field': {'$eq': 'value'}}) */ filter?: Record | null; /** Searchable fields to search in. If not provided, search is executed on all suggestable fields in schema */ searchFields?: string[]; /** A list of fields to include in the result set. If not provided, all fields of schema will be included. */ fields?: string[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; /** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`, `result-format`. */ properties?: SearchProperty[]; } /** * Searches for suggestions in multiple document types at once. * @public * @documentationMaturity preview */ declare function federatedSuggest(options?: FederatedSuggestOptions): Promise; interface FederatedSuggestOptions { /** Text to search for. Fields configured in suggester configuration will be searched. */ query?: string | null; /** Language to search in. */ language?: string | null; /** Number of suggested document to return per document type. */ limit?: number; /** Searchable fields to search in. If not provided, search is executed on all suggestable fields in schemas */ searchFields?: string[]; /** Document types to search in. If not provided, search is executed on all document types enabled for the site */ documentTypes?: string[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; /** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`, `result-format`. */ properties?: SearchProperty[]; } /** * Fetches documents similar to one single document. * This is typically used to implement "related to" scenarios (for example to fetch related store products when * consumer is already viewing one). * @public * @documentationMaturity preview */ declare function related(options?: RelatedOptions): Promise; interface RelatedOptions { /** ID of the document to fetch related documents for. */ documentId?: string | null; /** Document type of the document. */ documentType?: string | null; /** Fields to order by. */ ordering?: OrderingClauses; /** Language to search in. */ language?: string | null; /** Filter in platformized query language (for example {'field': {'$eq': 'value'}}). */ filter?: Record | null; /** Searchable fields to compare documents by. If not provided, all searchable fields in schema are used */ searchFields?: string[]; /** A list of fields to include in the result set. If not provided, all fields of schema will be included. */ fields?: string[]; /** Number of related documents to return */ limit?: number; /** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`. */ properties?: SearchProperty[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; } /** * Provides phrase completion. For example "blu" could return "blue", "blues" and "blunt" as candidate phrases. This operation is resource heavy at index time and is reserved for special use cases. * @public * @documentationMaturity preview */ declare function autocomplete(options?: AutocompleteOptions): Promise; interface AutocompleteOptions { /** Query phrase to fetch completions for. */ query?: string | null; /** Document type to use to search for phrases. */ documentType?: string | null; /** Limit of phrases to fetch. */ limit?: number; /** Language to search in. */ language?: string | null; /** Filter in platfromized query language (for example {'field': {'$eq': 'value'}}) */ filter?: Record | null; /** Searchable fields to use for query completion. If not provided, all searchable fields in schema are used */ searchFields?: string[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; } /** * Provides phrase completion from multiple document types at once * @public * @documentationMaturity preview */ declare function federatedAutocomplete(options?: FederatedAutocompleteOptions): Promise; interface FederatedAutocompleteOptions { /** Query phrase to fetch completions for. */ query?: string | null; /** Language to search in. */ language?: string | null; /** Number of queries to return per document type. */ limit?: number; /** Searchable fields to search in. If not provided, search is executed on all autocompletable fields in schemas */ searchFields?: string[]; /** Document types to autocomplete in. If not provided, autocomplete is executed on all document types enabled for the site */ documentTypes?: string[]; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; } /** * Returns trending documents for given document types * @public * @documentationMaturity preview */ declare function trending(options?: TrendingOptions): Promise; interface TrendingOptions { documentTypes?: string[]; language?: string | null; /** Include seo hidden documents. Defaults to false if not provided. */ includeSeoHidden?: boolean | null; /** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`, `result-format`. */ properties?: SearchProperty[]; } export { Aggregation, type AggregationFacet, type AutocompleteOptions, type AutocompleteRequest, type AutocompleteResponse, type AutocompleteResponseNonNullableFields, type AutocompleteResponseValue, type DeleteByFilterOperation, type DeleteByIdsOperation, Direction, type DocumentImage, type DocumentPayload, type DocumentUpdateOperation, type Empty, Enum, type FacetClause, type FacetClauseClauseOneOf, type FacetClauses, type FacetCountResponse, type FacetsResponse, type FacetsResponseResponseOneOf, type FederatedAutocompleteOptions, type FederatedAutocompleteRequest, type FederatedAutocompleteResponse, type FederatedAutocompleteResponseNonNullableFields, type FederatedAutocompleteResults, type FederatedSearchDocuments, type FederatedSearchOptions, type FederatedSearchRequest, type FederatedSearchResponse, type FederatedSearchResponseNonNullableFields, type FederatedSuggestDocuments, type FederatedSuggestOptions, type FederatedSuggestRequest, type FederatedSuggestResponse, type HierarchicalAggregationResponse, type HierarchicalFacet, type HierarchicalFacetClauseOneOf, type IdentificationData, type IdentificationDataIdOneOf, type IndexDocument, type InternalDocument, type InternalDocumentUpdateByFilterOperation, type InternalDocumentUpdateOperation, type InternalUpdateExistingOperation, type MaxAggregationResponse, type MessageEnvelope, type MinAggregationResponse, type MinMaxAggregationResponse, type NextPageResponse, type OrderingClause, type OrderingClauses, type RelatedOptions, type RelatedRequest, type RelatedResponse, type SearchOptions, type SearchPaging, type SearchProperty, type SearchRequest, type SearchResponse, type SearchResponseNonNullableFields, type SiteDocument, type SuggestOptions, type SuggestRequest, type SuggestResponse, type SumAggregationResponse, type TermAggregationResponse, type TermFacet, type TrendingItems, type TrendingOptions, type TrendingRequest, type TrendingResponse, type TrendingResponseNonNullableFields, type UpdateByFilterOperation, type UpdateDocumentsEvent, type UpdateDocumentsEventOperationOneOf, type UpdateExistingOperation, type UpdateInternalDocumentsEvent, type UpdateInternalDocumentsEventOperationOneOf, type V1DeleteByFilterOperation, type V1DeleteByIdsOperation, type Value, type VersionedDeleteByIdsOperation, type VersionedDocumentId, type VersionedDocumentUpdateOperation, VersioningMode, WebhookIdentityType, autocomplete, federatedAutocomplete, federatedSearch, federatedSuggest, related, search, suggest, trending };