interface SiteDocument$1 { /** * Result ID. * @readonly */ id?: string; /** The document payload. */ data?: Record | null; } interface SearchRequest$1 { /** Search query and aggregation information. */ search: Search$1; /** Document type to search in. */ documentType: DocumentType$1; /** Language to search in. */ language?: string | null; } interface Search$1 extends SearchPagingMethodOneOf$1 { /** Paging options to limit and skip the number of items. */ paging?: Paging$1; /** * 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"}]` */ sort?: Sorting$1[]; /** 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. */ aggregations?: Aggregation$1[]; /** Search information. */ search?: SearchDetails$1; } /** @oneof */ interface SearchPagingMethodOneOf$1 { /** Paging options to limit and skip the number of items. */ paging?: Paging$1; } interface Sorting$1 { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$1; } declare enum SortOrder$1 { ASC = "ASC", DESC = "DESC" } interface Aggregation$1 extends AggregationKindOneOf$1 { /** 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$1; /** 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$1; /** 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$1; /** Aggregation name displayed in the return. */ name?: string | null; /** Type of aggregation to perform. */ type?: AggregationType$1; /** Field to aggregate by. */ fieldPath?: string; } /** @oneof */ interface AggregationKindOneOf$1 { /** 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$1; /** 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$1; /** 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$1; } declare enum ScalarType$1 { /** Unknown scalar type. */ UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE", /** Minimum value. */ MIN = "MIN", /** Maximum value. */ MAX = "MAX", /** Sum of values. */ SUM = "SUM" } declare enum NestedAggregationType$1 { /** 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" } interface ValueAggregation$1 { /** * Maximum number of aggregation results to return. * Min: `1` * Max: `250` * Default: `10` */ limit?: number | null; } interface ScalarAggregation$1 { /** Type of scalar aggregation. */ type?: ScalarType$1; } interface NestedAggregationItem$1 extends NestedAggregationItemKindOneOf$1 { /** 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$1; /** 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$1; /** Aggregation name displayed in the return. */ name?: string | null; /** Type of aggregation to perform. */ type?: NestedAggregationType$1; /** Field to aggregate by. */ fieldPath?: string; } /** @oneof */ interface NestedAggregationItemKindOneOf$1 { /** 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$1; /** 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$1; } declare enum AggregationType$1 { 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" } /** List of aggregations. Each aggregation is nested within the previous one. */ interface NestedAggregation$1 { /** List of aggregations, where each aggregation is nested within previous one. */ nestedAggregations?: NestedAggregationItem$1[]; } interface SearchDetails$1 { /** Search term or expression. */ expression?: string | null; /** * Fields to search in. * If the array is empty, all fields are searched. */ 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$1 { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } declare enum DocumentType$1 { 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" } interface SearchResponse$1 extends SearchResponsePagingOneOf$1 { /** Paging metadata. */ pagingOffsetMetadata?: PagingMetadata$1; /** Documents matching the search query. */ siteDocumentItems?: SiteDocument$1[]; /** Aggregated data. */ aggregationData?: AggregationData$1; } /** @oneof */ interface SearchResponsePagingOneOf$1 { /** Paging metadata. */ pagingOffsetMetadata?: PagingMetadata$1; } interface AggregationData$1 { /** List of the aggregated data results. */ results?: AggregationResults$1[]; } interface ValueAggregationResult$1 { /** Value contained in the field specified in `fieldPath` for this aggregation in the request. */ value?: string; /** Number of documents containing the specified value in the specified field. */ count?: number; } interface ValueResults$1 { /** List of value aggregation results. */ results?: ValueAggregationResult$1[]; } interface AggregationResultsScalarResult$1 { /** Type of scalar aggregation. */ type?: ScalarType$1; /** Value of the scalar aggregation. For example, the minimum, maximum, or total value for the specified field. */ value?: number; } interface ValueResult$1 { /** Value contained in the field specified in `fieldPath` for this aggregation in the request. */ value?: string; /** Number of documents containing the specified value in the specified field. */ count?: number | null; } interface ScalarResult$1 { /** Scalar aggregation results. */ value?: number; } interface NestedResultValue$1 extends NestedResultValueResultOneOf$1 { /** Value aggregation results. */ value?: ValueResult$1; /** Scalar aggregation results. */ scalar?: ScalarResult$1; } /** @oneof */ interface NestedResultValueResultOneOf$1 { /** Value aggregation results. */ value?: ValueResult$1; /** Scalar aggregation results. */ scalar?: ScalarResult$1; } interface Results$1 { /** 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$1 { /** List of nested aggregation results. */ results?: Results$1[]; } interface AggregationResults$1 extends AggregationResultsResultOneOf$1 { /** Value aggregation results. */ values?: ValueResults$1; /** Scalar aggregation results. */ scalar?: AggregationResultsScalarResult$1; /** Nested aggregation results. */ nested?: NestedResults$1; /** Aggregation name defined in the request. */ name?: string; /** Type of aggregation that was performed. */ type?: AggregationType$1; /** Field the data was aggregated by. */ fieldPath?: string; } /** @oneof */ interface AggregationResultsResultOneOf$1 { /** Value aggregation results. */ values?: ValueResults$1; /** Scalar aggregation results. */ scalar?: AggregationResultsScalarResult$1; /** Nested aggregation results. */ nested?: NestedResults$1; } interface PagingMetadata$1 { /** 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 SiteDocumentNonNullableFields$1 { id: string; } interface ValueAggregationResultNonNullableFields$1 { value: string; count: number; } interface ValueResultsNonNullableFields$1 { results: ValueAggregationResultNonNullableFields$1[]; } interface AggregationResultsScalarResultNonNullableFields$1 { type: ScalarType$1; value: number; } interface AggregationResultsNonNullableFields$1 { values?: ValueResultsNonNullableFields$1; scalar?: AggregationResultsScalarResultNonNullableFields$1; name: string; type: AggregationType$1; fieldPath: string; } interface AggregationDataNonNullableFields$1 { results: AggregationResultsNonNullableFields$1[]; } interface SearchResponseNonNullableFields$1 { siteDocumentItems: SiteDocumentNonNullableFields$1[]; aggregationData?: AggregationDataNonNullableFields$1; } interface SiteDocument { /** * Result ID. * @readonly */ _id?: string; /** The document payload. */ data?: Record | null; } interface SearchRequest { /** Search query and aggregation information. */ search: Search; /** Document type to search in. */ documentType: DocumentType; /** Language to search in. */ 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"}]` */ 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. */ 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. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } declare enum SortOrder { ASC = "ASC", DESC = "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. */ name?: string | null; /** Type of aggregation to perform. */ type?: AggregationType; /** Field to aggregate by. */ 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", /** Sum of values. */ SUM = "SUM" } 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" } 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?: ScalarType; } 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. */ name?: string | null; /** Type of aggregation to perform. */ type?: NestedAggregationType; /** Field to aggregate by. */ 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" } /** List of aggregations. Each aggregation is nested within the previous one. */ interface NestedAggregation { /** List of aggregations, where each aggregation is nested within previous one. */ nestedAggregations?: NestedAggregationItem[]; } interface SearchDetails { /** Search term or expression. */ expression?: string | null; /** * Fields to search in. * If the array is empty, all fields are searched. */ 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" } 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. */ results?: AggregationResults[]; } interface ValueAggregationResult { /** Value contained in the field specified in `fieldPath` for this aggregation in the request. */ value?: string; /** Number of documents containing the specified value in the specified field. */ count?: number; } interface ValueResults { /** List of value aggregation results. */ results?: ValueAggregationResult[]; } interface AggregationResultsScalarResult { /** Type of scalar aggregation. */ type?: ScalarType; /** 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. */ 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. */ 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. */ name?: string; /** Type of aggregation that was performed. */ type?: AggregationType; /** Field the data was aggregated by. */ 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 SiteDocumentNonNullableFields { _id: string; } interface ValueAggregationResultNonNullableFields { value: string; count: number; } interface ValueResultsNonNullableFields { results: ValueAggregationResultNonNullableFields[]; } interface AggregationResultsScalarResultNonNullableFields { type: ScalarType; value: number; } interface AggregationResultsNonNullableFields { values?: ValueResultsNonNullableFields; scalar?: AggregationResultsScalarResultNonNullableFields; name: string; type: AggregationType; fieldPath: string; } interface AggregationDataNonNullableFields { results: AggregationResultsNonNullableFields[]; } interface SearchResponseNonNullableFields { siteDocumentItems: SiteDocumentNonNullableFields[]; aggregationData?: AggregationDataNonNullableFields; } 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, SearchRequest$1, SearchResponse & SearchResponseNonNullableFields, SearchResponse$1 & SearchResponseNonNullableFields$1>; export { type __PublicMethodMetaInfo, search };