import { k as SearchRequest$1, b as SearchResponse$1, K as AutocompleteRequest$1, c as AutocompleteResponse$1, M as SuggestRequest$1, e as SuggestResponse$1 } from './search-platformized-v1-site-document-wix-site-search.universal-TdVMLStL.js'; import '@wix/sdk-types'; interface SiteDocument { /** * Result ID. * @readonly * @maxLength 120 */ id?: string; /** The document payload. */ data?: Record | null; } interface SearchRequest { /** Search query and aggregation information. */ search: Search; /** Document type to search in. */ documentType: DocumentTypeWithLiterals; /** * Language to search in. * @format LANGUAGE */ language?: string | null; } interface Search extends SearchPagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` * @maxSize 10 */ sort?: Sorting[]; /** * A search method for grouping data into various categories (facets) and providing summaries for each category. For example, use aggregations to categorize search results by specific price ranges, brand names, or ratings. * @maxSize 10 */ aggregations?: Aggregation[]; /** Search information. */ search?: SearchDetails; } /** @oneof */ interface SearchPagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; } interface Sorting { /** * Name of the field to sort by. * @minLength 2 * @maxLength 100 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface Aggregation extends AggregationKindOneOf { /** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */ value?: ValueAggregation; /** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the total, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */ scalar?: ScalarAggregation; /** Pass if `type` is `NESTED`. A nested aggregation is applied to the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. This allows for more complex analyses that summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on the field containing the price, and a second value aggregation on the field indicating whether a product is in stock. You can nest up to a maximum of 3 aggregations. Each aggregation can be either value-based or scalar, allowing flexibility in how the data is grouped and analyzed. */ nested?: NestedAggregation; /** * Aggregation name displayed in the return. * @maxLength 100 */ name?: string | null; /** Type of aggregation to perform. */ type?: AggregationTypeWithLiterals; /** * Field to aggregate by. * @maxLength 200 */ fieldPath?: string; } /** @oneof */ interface AggregationKindOneOf { /** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */ value?: ValueAggregation; /** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the total, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */ scalar?: ScalarAggregation; /** Pass if `type` is `NESTED`. A nested aggregation is applied to the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. This allows for more complex analyses that summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on the field containing the price, and a second value aggregation on the field indicating whether a product is in stock. You can nest up to a maximum of 3 aggregations. Each aggregation can be either value-based or scalar, allowing flexibility in how the data is grouped and analyzed. */ nested?: NestedAggregation; } declare enum ScalarType { /** Unknown scalar type. */ UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE", /** Minimum value. */ MIN = "MIN", /** Maximum value. */ MAX = "MAX" } /** @enumType */ type ScalarTypeWithLiterals = ScalarType | 'UNKNOWN_SCALAR_TYPE' | 'MIN' | 'MAX'; declare enum NestedAggregationType { /** Unknown aggregation type. */ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE", /** An aggregation where result buckets are dynamically built - one per unique value. */ VALUE = "VALUE", /** A single-value metric aggregation - e.g. min, max, sum, avg. */ SCALAR = "SCALAR" } /** @enumType */ type NestedAggregationTypeWithLiterals = NestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'SCALAR'; interface ValueAggregation { /** * Maximum number of aggregation results to return. * Min: `1` * Max: `250` * Default: `10` */ limit?: number | null; } interface ScalarAggregation { /** Type of scalar aggregation. */ type?: ScalarTypeWithLiterals; } interface NestedAggregationItem extends NestedAggregationItemKindOneOf { /** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */ value?: ValueAggregation; /** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the total, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */ scalar?: ScalarAggregation; /** * Aggregation name displayed in the return. * @maxLength 100 */ name?: string | null; /** Type of aggregation to perform. */ type?: NestedAggregationTypeWithLiterals; /** * Field to aggregate by. * @maxLength 200 */ fieldPath?: string; } /** @oneof */ interface NestedAggregationItemKindOneOf { /** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */ value?: ValueAggregation; /** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the total, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */ scalar?: ScalarAggregation; } declare enum AggregationType { UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE", /** An aggregation where result buckets are dynamically built - one per unique value. */ VALUE = "VALUE", /** A single-value metric aggregation - e.g. min, max, sum, avg. */ SCALAR = "SCALAR", /** Multi-level aggregation, where each next aggregation is nested within previous one. */ NESTED = "NESTED" } /** @enumType */ type AggregationTypeWithLiterals = AggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'SCALAR' | 'NESTED'; /** List of aggregations. Each aggregation is nested within the previous one. */ interface NestedAggregation { /** * List of aggregations, where each aggregation is nested within previous one. * @minSize 2 * @maxSize 3 */ nestedAggregations?: NestedAggregationItem[]; } interface SearchDetails { /** * Search term or expression. * @maxLength 100 */ expression?: string | null; /** * Fields to search in. * If the array is empty, all fields are searched. * @maxSize 10 * @maxLength 50 */ fields?: string[]; /** Whether to allow the search function to automatically correct typos or minor mistakes in the search expression. The search function uses an algorithm to find results that are close to the text provided. */ fuzzy?: boolean; } interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } declare enum DocumentType { UNSPECIFIED = "UNSPECIFIED", BLOG_POSTS = "BLOG_POSTS", BOOKING_SERVICES = "BOOKING_SERVICES", EVENTS = "EVENTS", FORUM_CONTENT = "FORUM_CONTENT", ONLINE_PROGRAMS = "ONLINE_PROGRAMS", PROGALLERY_ITEM = "PROGALLERY_ITEM", STORES_PRODUCTS = "STORES_PRODUCTS" } /** @enumType */ type DocumentTypeWithLiterals = DocumentType | 'UNSPECIFIED' | 'BLOG_POSTS' | 'BOOKING_SERVICES' | 'EVENTS' | 'FORUM_CONTENT' | 'ONLINE_PROGRAMS' | 'PROGALLERY_ITEM' | 'STORES_PRODUCTS'; interface SearchResponse extends SearchResponsePagingOneOf { /** Paging metadata. */ pagingOffsetMetadata?: PagingMetadata; /** Documents matching the search query. */ siteDocumentItems?: SiteDocument[]; /** Aggregated data. */ aggregationData?: AggregationData; } /** @oneof */ interface SearchResponsePagingOneOf { /** Paging metadata. */ pagingOffsetMetadata?: PagingMetadata; } interface AggregationData { /** * List of the aggregated data results. * @maxSize 10000 */ results?: AggregationResults[]; } interface ValueAggregationResult { /** * Value contained in the field specified in `fieldPath` for this aggregation in the request. * @maxLength 100 */ value?: string; /** Number of documents containing the specified value in the specified field. */ count?: number; } interface ValueResults { /** * List of value aggregation results. * @maxSize 250 */ results?: ValueAggregationResult[]; } interface AggregationResultsScalarResult { /** Type of scalar aggregation. */ type?: ScalarTypeWithLiterals; /** Value of the scalar aggregation. For example, the minimum, maximum, or total value for the specified field. */ value?: number; } interface ValueResult { /** * Value contained in the field specified in `fieldPath` for this aggregation in the request. * @maxLength 1000 */ value?: string; /** Number of documents containing the specified value in the specified field. */ count?: number | null; } interface ScalarResult { /** Scalar aggregation results. */ value?: number; } interface NestedResultValue extends NestedResultValueResultOneOf { /** Value aggregation results. */ value?: ValueResult; /** Scalar aggregation results. */ scalar?: ScalarResult; } /** @oneof */ interface NestedResultValueResultOneOf { /** Value aggregation results. */ value?: ValueResult; /** Scalar aggregation results. */ scalar?: ScalarResult; } interface Results { /** Aggregation results. */ results?: Record; } /** * Results of `NESTED` aggregation type in a flattened form * aggregations in resulting array are keyed by requested aggregation `name`. */ interface NestedResults { /** * List of nested aggregation results. * @maxSize 1000 */ results?: Results[]; } interface AggregationResults extends AggregationResultsResultOneOf { /** Value aggregation results. */ values?: ValueResults; /** Scalar aggregation results. */ scalar?: AggregationResultsScalarResult; /** Nested aggregation results. */ nested?: NestedResults; /** * Aggregation name defined in the request. * @maxLength 100 */ name?: string; /** Type of aggregation that was performed. */ type?: AggregationTypeWithLiterals; /** * Field the data was aggregated by. * @maxLength 200 */ fieldPath?: string; } /** @oneof */ interface AggregationResultsResultOneOf { /** Value aggregation results. */ values?: ValueResults; /** Scalar aggregation results. */ scalar?: AggregationResultsScalarResult; /** Nested aggregation results. */ nested?: NestedResults; } interface PagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. */ total?: number | null; /** Whether the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; } interface AutocompleteRequest { /** * Query phrase to fetch completions for. * @maxLength 50 */ query: string | null; /** Document type to use to search for phrases. */ documentType: DocumentTypeWithLiterals; /** * Limit of phrases to fetch. * @min 1 * @max 100 */ limit?: number; /** * Language to search in. * @format LANGUAGE */ language?: string | null; /** Filter in platformized query language (for example {'field': {'$eq': 'value'}}) */ filter?: Record | null; /** * Autocompletable fields to use for query completion. If not provided, all autocompletable fields in schema are used * @maxSize 10 * @maxLength 50 */ searchFields?: string[]; } interface AutocompleteResponse { /** Suggested phrases. */ values?: AutocompleteResponseValue[]; } interface AutocompleteResponseValue { /** * Suggested phrase. * @maxLength 100 */ query?: string; } interface SuggestRequest { /** Document type of documents to search for. */ documentType: DocumentTypeWithLiterals; /** Suggest query information. */ suggest: Suggest; /** * Number of suggested document to return. * @min 1 * @max 100 */ limit?: number; /** * Language to search in. * @format LANGUAGE */ language?: string | null; } interface Suggest extends SuggestPagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` * @maxSize 10 */ sort?: Sorting[]; /** Search information. */ suggest?: SuggestDetails; } /** @oneof */ interface SuggestPagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; } interface SuggestDetails { /** * Search term or expression. * @maxLength 100 */ expression?: string | null; /** * Fields to search in. * If the array is empty, all fields are searched. * @maxSize 10 * @maxLength 50 */ fields?: string[]; } interface SuggestResponse { /** Suggested documents. */ siteDocumentItems?: SiteDocument[]; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function search(): __PublicMethodMetaInfo<'POST', {}, SearchRequest$1, SearchRequest, SearchResponse$1, SearchResponse>; declare function autocomplete(): __PublicMethodMetaInfo<'POST', {}, AutocompleteRequest$1, AutocompleteRequest, AutocompleteResponse$1, AutocompleteResponse>; declare function suggest(): __PublicMethodMetaInfo<'POST', {}, SuggestRequest$1, SuggestRequest, SuggestResponse$1, SuggestResponse>; export { type AggregationData as AggregationDataOriginal, type AggregationKindOneOf as AggregationKindOneOfOriginal, type Aggregation as AggregationOriginal, type AggregationResults as AggregationResultsOriginal, type AggregationResultsResultOneOf as AggregationResultsResultOneOfOriginal, type AggregationResultsScalarResult as AggregationResultsScalarResultOriginal, AggregationType as AggregationTypeOriginal, type AggregationTypeWithLiterals as AggregationTypeWithLiteralsOriginal, type AutocompleteRequest as AutocompleteRequestOriginal, type AutocompleteResponse as AutocompleteResponseOriginal, type AutocompleteResponseValue as AutocompleteResponseValueOriginal, DocumentType as DocumentTypeOriginal, type DocumentTypeWithLiterals as DocumentTypeWithLiteralsOriginal, type NestedAggregationItemKindOneOf as NestedAggregationItemKindOneOfOriginal, type NestedAggregationItem as NestedAggregationItemOriginal, type NestedAggregation as NestedAggregationOriginal, NestedAggregationType as NestedAggregationTypeOriginal, type NestedAggregationTypeWithLiterals as NestedAggregationTypeWithLiteralsOriginal, type NestedResultValue as NestedResultValueOriginal, type NestedResultValueResultOneOf as NestedResultValueResultOneOfOriginal, type NestedResults as NestedResultsOriginal, type PagingMetadata as PagingMetadataOriginal, type Paging as PagingOriginal, type Results as ResultsOriginal, type ScalarAggregation as ScalarAggregationOriginal, type ScalarResult as ScalarResultOriginal, ScalarType as ScalarTypeOriginal, type ScalarTypeWithLiterals as ScalarTypeWithLiteralsOriginal, type SearchDetails as SearchDetailsOriginal, type Search as SearchOriginal, type SearchPagingMethodOneOf as SearchPagingMethodOneOfOriginal, type SearchRequest as SearchRequestOriginal, type SearchResponse as SearchResponseOriginal, type SearchResponsePagingOneOf as SearchResponsePagingOneOfOriginal, type SiteDocument as SiteDocumentOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type SuggestDetails as SuggestDetailsOriginal, type Suggest as SuggestOriginal, type SuggestPagingMethodOneOf as SuggestPagingMethodOneOfOriginal, type SuggestRequest as SuggestRequestOriginal, type SuggestResponse as SuggestResponseOriginal, type ValueAggregation as ValueAggregationOriginal, type ValueAggregationResult as ValueAggregationResultOriginal, type ValueResult as ValueResultOriginal, type ValueResults as ValueResultsOriginal, type __PublicMethodMetaInfo, autocomplete, search, suggest };